Bug 1304593 - Use |mach python-test| to run python unittests from make check, r=ted
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 26 Sep 2016 15:29:02 -0400
changeset 316199 27f488a1f9efa704afc98f2319aca94eaed4b32d
parent 316198 9d5982f805c9b8cc26360ebafb9519c7414434e9
child 316200 326e6c945c377e7a55a9de179cffc2ef0c711826
push id30765
push userphilringnalda@gmail.com
push dateTue, 04 Oct 2016 03:06:46 +0000
treeherdermozilla-central@adb484f84dec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1304593
milestone52.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 1304593 - Use |mach python-test| to run python unittests from make check, r=ted Currently make check loops over all directories and runs each test file in PYTHON_UNIT_TESTS individually. This patch instead creates a single top-level check target that runs |mach python-tests|. This should make automation more similar to running locally, be a bit quicker and make it easier to pull python tests out of make check completely at a future date. MozReview-Commit-ID: 4Hg4zdFyc61
config/rules.mk
testing/testsuite-targets.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -90,32 +90,16 @@ cppunittests-remote:
 			--deviceIP=${TEST_DEVICE} \
 			$(CPP_UNIT_TESTS) $(EXTRA_TEST_ARGS); \
 	else \
 		echo 'please prepare your host with environment variables for TEST_DEVICE'; \
 	fi
 
 endif # COMPILE_ENVIRONMENT
 endif # CPP_UNIT_TESTS
-
-.PHONY: check
-
-ifdef PYTHON_UNIT_TESTS
-
-RUN_PYTHON_UNIT_TESTS := $(addsuffix -run,$(PYTHON_UNIT_TESTS))
-
-.PHONY: $(RUN_PYTHON_UNIT_TESTS)
-
-check:: $(RUN_PYTHON_UNIT_TESTS)
-
-$(RUN_PYTHON_UNIT_TESTS): %-run: %
-	@PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $<
-
-endif # PYTHON_UNIT_TESTS
-
 endif # ENABLE_TESTS
 
 
 #
 # Library rules
 #
 # If FORCE_STATIC_LIB is set, build a static library.
 # Otherwise, build a shared library.
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -330,16 +330,21 @@ stage-instrumentation-tests: make-stage-
 TEST_EXTENSIONS := \
     specialpowers@mozilla.org.xpi \
 	$(NULL)
 
 stage-extensions: make-stage-dir
 	$(NSINSTALL) -D $(PKG_STAGE)/extensions/
 	@$(foreach ext,$(TEST_EXTENSIONS), cp -RL $(DIST)/xpi-stage/$(ext) $(PKG_STAGE)/extensions;)
 
+
+check::
+	@$(topsrcdir)/mach --log-no-times python-test
+
+
 .PHONY: \
   reftest \
   crashtest \
   xpcshell-tests \
   jstestbrowser \
   package-tests \
   package-tests-prepare-dest \
   package-tests-common \
@@ -349,9 +354,10 @@ stage-extensions: make-stage-dir
   stage-config \
   stage-mochitest \
   stage-jstests \
   stage-android \
   stage-jetpack \
   stage-steeplechase \
   stage-instrumentation-tests \
   test-packages-manifest \
+  check \
   $(NULL)