[mini] Explicitly turn nunit output on or off based on variable
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 21 Jul 2016 20:30:47 +0000 (22:30 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 21 Jul 2016 22:20:14 +0000 (00:20 +0200)
Alternative implementation to 8f092147bb604485c78c80b9781536ec995d51fe.

In CI we explicitly pass EMIT_NUNIT=1 and check-seq-points to generate the nunit xml and run the tests,
locally those are omitted. This avoids needing to sniff for Jenkins/Wrench variables.

Same for a9eec21d62ecd1da3929cdbfea872bfc4d22134b, but we already pass V=1 in Jenkins.

mono/mini/Makefile.am.in
mono/tests/Makefile.am
scripts/ci/run-test-default.sh

index 15a89aade3676522290c0affa9c36f4bceb677bd..53643070fbdefcd53ded85e39e17f2144896265e 100755 (executable)
@@ -695,15 +695,11 @@ testi: mono test.exe
 checktests: $(regtests)
        for i in $(regtests); do $(MINI_RUNTIME) $$i; done
 
-rcheck-ci: mono $(regtests)
-if NACL_CODEGEN
-       for i in $(regtests); do echo "running test $$i"; $(MINI_RUNTIME) $$i --exclude 'NaClDisable' || exit 1; done
-else
+rcheck-nunit: mono $(regtests)
        -($(MINI_RUNTIME) --regression $(regtests); echo $$? > regressionexitcode.out) | $(srcdir)/emitnunit.pl
        exit $$(cat regressionexitcode.out)
-endif
 
-rcheck-normal: mono $(regtests)
+rcheck: mono $(regtests)
        $(MINI_RUNTIME) --regression $(regtests)
 
 if ARM
@@ -821,12 +817,8 @@ stat3: mono bench.exe
 docu: mini.sgm
        docbook2txt mini.sgm
 
-# CI - Wrench
-# BUILD_URL = Jenkins
-RUNNING_ON_CI = $(CI)$(BUILD_URL)
-
 # We need these because automake can't process normal make conditionals
-check_local_targets = $(if $(RUNNING_ON_CI), rcheck-ci check-seq-points, rcheck-normal)
+check_local_targets = $(if $(EMIT_NUNIT), rcheck-nunit, rcheck)
 
 check-local: $(check_local_targets)
 
index c8aaaa3d0f55fc1c6c8221201f8fff3c6a4ee239..ff1bc41f0f3ff7627e0a2bf1f622d76462c7884f 100644 (file)
@@ -19,13 +19,6 @@ test-wrench: check-parallel
 
 aotcheck: testaot gshared-aot
 
-# Whenever running under CI
-# Can't use make conditionals since
-# automake doesn't support them
-# CI - Wrench
-# BUILD_URL = Jenkins
-RUNNING_ON_CI = $(CI)$(BUILD_URL)
-
 TEST_PROG = ../interpreter/mint
 
 JITTEST_PROG = $(if $(VALGRIND), valgrind $(VALGRIND_ARGS),) $(if $(SGEN),$(top_builddir)/mono/mini/mono-sgen,$(top_builddir)/mono/mini/mono)
@@ -41,7 +34,6 @@ else
 TEST_RUNNER_ARGS=--config tests-config --runtime $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),mono)
 endif
 
-TEST_RUNNER_ARGS += $(if $(RUNNING_ON_CI), --verbose,)
 TEST_RUNNER_ARGS += $(if $(V), --verbose,)
 
 CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
index bcce919fa7d309f85d52a9e2d2be7eddbd889679..3ecee62fd998986ccb4369062f2c69822055a9e7 100755 (executable)
@@ -2,7 +2,7 @@
 
 export TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
 
-${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k check
+${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k check check-seq-points EMIT_NUNIT=1
 ${TESTCMD} --label=runtime --timeout=160m make -w -C mono/tests -k test-wrench V=1 CI=1
 ${TESTCMD} --label=corlib --timeout=30m make -w -C mcs/class/corlib run-test
 ${TESTCMD} --label=verify --timeout=15m make -w -C runtime mcs-compileall