Bug 1338608 - Move check_mkdir.tpy into a python unittest manifest; r=chmanchester
authorMike Shal <mshal@mozilla.com>
Thu, 02 Feb 2017 17:49:11 -0500
changeset 389965 007864924aeb7fad4442c56c8cd10276d58e9e06
parent 389964 d0f4a83212fc53e30ccef7283c920323e8dc78cc
child 389966 002f04770d29a7b0aafe15f99231bf85ba7fba4d
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1338608
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1338608 - Move check_mkdir.tpy into a python unittest manifest; r=chmanchester We also rename it to check_mkdir.py for consistency with other python files. MozReview-Commit-ID: ALuX6NUMsD2
config/Makefile.in
config/moz.build
config/tests/makefiles/autodeps/Makefile.in
config/tests/makefiles/autodeps/check_mkdir.py
config/tests/makefiles/autodeps/check_mkdir.tpy
config/tests/makefiles/autodeps/moz.build
config/tests/python.ini
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -82,22 +82,18 @@ endif
 GARBAGE += \
   $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) $(srcdir)/*.pyc *.pyc
 
 FORCE:
 
 ifndef JS_STANDALONE
 check-preqs += check-jar-mn
 endif
-check-preqs += check-makefiles
 
 check:: $(check-preqs)
 
 check-jar-mn::
 	$(MAKE) -C tests/src-simple check-jar
 	$(MAKE) -C tests/src-simple check-flat
 	$(MAKE) -C tests/src-simple check-flat USE_EXTENSION_MANIFEST=1
 ifneq (,$(filter-out WINNT,$(OS_ARCH)))
 	$(MAKE) -C tests/src-simple check-symlink
 endif
-
-check-makefiles:
-	$(MAKE) -C tests/makefiles/autodeps check
--- a/config/moz.build
+++ b/config/moz.build
@@ -10,17 +10,16 @@ with Files('**'):
 DIST_INSTALL = False
 # For sanity's sake, we compile nsinstall without the wrapped system
 # headers, so that we can use it to set up the wrapped system headers.
 NO_VISIBILITY_FLAGS = True
 
 CONFIGURE_SUBST_FILES += [
     'doxygen.cfg',
     'makefiles/test/Makefile',
-    'tests/makefiles/autodeps/Makefile',
     'tests/src-simple/Makefile',
 ]
 
 if CONFIG['HOST_OS_ARCH'] != 'WINNT':
     HOST_SOURCES += [
         'nsinstall.c',
         'pathsub.c',
     ]
deleted file mode 100644
--- a/config/tests/makefiles/autodeps/Makefile.in
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- makefile -*-
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this file,
-# You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-export STANDALONE_MAKEFILE=1
-PYTHON ?= python
-PYTEST = $(PYTHON) -E
-
-# python -B not supported by older interpreters
-export PYTHONDONTWRITEBYTECODE=1
-
-include $(topsrcdir)/config/rules.mk
-
-autotgt_tests = .deps/autotargets.mk.ts
-
-tgts =\
-  .deps/.mkdir.done\
-  $(autotgt_tests)
-  $(NULL)
-
-export MAKE
-
-##------------------_##
-##---]  TARGETS  [---##
-##------------------_##
-all::
-
-check:: $(tgts)
-
-# Only run unit test when autotargets.mk is modified
-$(autotgt_tests): $(topsrcdir)/config/makefiles/autotargets.mk
-	$(PYTEST) $(srcdir)/check_mkdir.tpy
-	@$(TOUCH) $@
rename from config/tests/makefiles/autodeps/check_mkdir.tpy
rename to config/tests/makefiles/autodeps/check_mkdir.py
--- a/config/tests/makefiles/autodeps/check_mkdir.tpy
+++ b/config/tests/makefiles/autodeps/check_mkdir.py
@@ -42,17 +42,17 @@ def myopts(vals):
 
         for k in dir(vals):
             if k[0:1] == '_':
                 continue
             tmp[k] = getattr(vals, k)
         myopts.vals = tmp
 
     return myopts.vals
-    
+
 
 def path2posix(src):
     """
     Normalize directory path syntax
 
     Keyword arguments:
     src - path to normalize
 
@@ -73,17 +73,17 @@ def path2posix(src):
     if drive:
         todo = [ '', drive.rstrip(':').lstrip('/').lstrip('\\') ]
         todo.extend( tail.lstrip('/').lstrip('\\').split('\\') ) # c:\a => [a]
     else: # os.name == 'posix'
         todo = src.split('\\')
 
     dst = '/'.join(todo)
     return dst
-    
+
 
 def checkMkdir(work, debug=False):
     """
     Verify arg permutations for directory mutex creation.
 
     Keyword arguments:
     None
 
@@ -161,17 +161,17 @@ def checkMkdir(work, debug=False):
         logging.debug("Did testing mkdir(%s) succeed?" % (path))
         if not os.path.exists(path):
             raise Exception("Test path %s does not exist" % (path))
 
 
 def parseargs():
     """
     Support additional command line arguments for testing
-    
+
     Returns:
     hash - arguments of interested parsed from the command line
     """
 
     opts = None
     try:
         import argparse2
         parser = argparse.ArgumentParser()
deleted file mode 100644
--- a/config/tests/makefiles/autodeps/moz.build
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
--- a/config/tests/python.ini
+++ b/config/tests/python.ini
@@ -1,5 +1,6 @@
 [test_mozbuild_reading.py]
 [unit-expandlibs.py]
 [unit-mozunit.py]
 [unit-nsinstall.py]
 [unit-printprereleasesuffix.py]
+[makefiles/autodeps/check_mkdir.py]