From 80ccd65f02c36c50d533c43d4627b53db801b332 Mon Sep 17 00:00:00 2001 From: Samuel Hym Date: Tue, 10 Sep 2024 18:57:18 +0200 Subject: [PATCH 1/5] Silence all skipped tests --- src/array/dune | 2 +- src/atomic/dune | 2 +- src/domain/dune | 2 +- src/hashtbl/dune | 2 +- src/io/dune | 4 ++-- src/lazy/dune | 4 ++-- src/neg_tests/dune | 6 +++--- src/queue/dune | 2 +- src/stack/dune | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/array/dune b/src/array/dune index c69df6358..f9ab697c6 100644 --- a/src/array/dune +++ b/src/array/dune @@ -15,7 +15,7 @@ (flags (:standard -w -27)) (libraries qcheck-lin.domain) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/array/%{test} from the test suite\n\n")) + (action (progn)) ) (test diff --git a/src/atomic/dune b/src/atomic/dune index f188c03bf..9d967b41d 100644 --- a/src/atomic/dune +++ b/src/atomic/dune @@ -19,7 +19,7 @@ (flags (:standard -w -27)) (libraries qcheck-lin.domain) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/atomic/%{test} from the test suite\n\n")) + (action (progn)) ) (test diff --git a/src/domain/dune b/src/domain/dune index 8048842f9..134b60642 100644 --- a/src/domain/dune +++ b/src/domain/dune @@ -24,7 +24,7 @@ (package multicoretests) (libraries qcheck-lin.domain) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/domain/%{test} from the test suite\n\n")) + (action (progn)) ) (test diff --git a/src/hashtbl/dune b/src/hashtbl/dune index 4ff1afa75..9ad1c50ce 100644 --- a/src/hashtbl/dune +++ b/src/hashtbl/dune @@ -15,7 +15,7 @@ (flags (:standard -w -27)) (libraries qcheck-lin.domain) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/hashtbl/%{test} from the test suite\n\n")) + (action (progn)) ) (test diff --git a/src/io/dune b/src/io/dune index 942c96d27..478c7a946 100644 --- a/src/io/dune +++ b/src/io/dune @@ -7,7 +7,7 @@ ;(flags (:standard -w -27)) (libraries qcheck-lin.domain) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/io/%{test} from the test suite\n\n")) + (action (progn)) ) (library @@ -33,7 +33,7 @@ ;(flags (:standard -w -27)) (libraries qcheck-lin.thread lin_tests_spec_io) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/io/%{test} from the test suite\n\n")) + (action (progn)) ) (test diff --git a/src/lazy/dune b/src/lazy/dune index a6e4c4a3f..2572e30c8 100644 --- a/src/lazy/dune +++ b/src/lazy/dune @@ -14,7 +14,7 @@ (package multicoretests) (libraries qcheck-lin.domain) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/lazy/%{test} from the test suite\n\n")) + (action (progn)) ) (test @@ -23,5 +23,5 @@ (package multicoretests) (libraries qcheck-lin.domain) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/lazy/%{test} from the test suite\n\n")) + (action (progn)) ) diff --git a/src/neg_tests/dune b/src/neg_tests/dune index dc7ca44a2..fa9543600 100644 --- a/src/neg_tests/dune +++ b/src/neg_tests/dune @@ -85,7 +85,7 @@ (flags (:standard -w -27)) (libraries lin_tests_common qcheck-lin.thread) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/neg_tests/%{test} from the test suite\n\n")) + (action (progn)) ) (test @@ -106,7 +106,7 @@ (flags (:standard -w -27)) (libraries lin_internal_tests_common qcheck-lin.domain) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/neg_tests/%{test} from the test suite\n\n")) + (action (progn)) ) (tests @@ -125,5 +125,5 @@ (flags (:standard -w -27)) (libraries lin_internal_tests_common qcheck-lin.effect) ; (action (run ./%{deps} --verbose)) - (action (echo "Skipping src/neg_tests/%{test} from the test suite\n\n")) + (action (progn)) ) diff --git a/src/queue/dune b/src/queue/dune index afa32384a..a3daedb5d 100644 --- a/src/queue/dune +++ b/src/queue/dune @@ -16,5 +16,5 @@ (flags (:standard -w -27)) (libraries qcheck-lin.domain qcheck-lin.thread) ;(action (run %{test} --verbose)) - (action (echo "Skipping src/queue/%{test} from the test suite\n\n")) + (action (progn)) ) diff --git a/src/stack/dune b/src/stack/dune index bcfcfef40..fad4fdda9 100644 --- a/src/stack/dune +++ b/src/stack/dune @@ -16,6 +16,6 @@ (flags (:standard -w -27)) (libraries qcheck-lin.domain qcheck-lin.thread) ; (action (run %{test} --verbose)) - (action (echo "Skipping src/stack/%{test} from the test suite\n\n")) + (action (progn)) ) From fa43e24326cc3927f09c749a6ff5326fda715c5f Mon Sep 17 00:00:00 2001 From: Samuel Hym Date: Tue, 10 Sep 2024 19:02:27 +0200 Subject: [PATCH 2/5] Remove an obsolete comment --- dune | 2 -- 1 file changed, 2 deletions(-) diff --git a/dune b/dune index d436452d8..52ec2c717 100644 --- a/dune +++ b/dune @@ -18,8 +18,6 @@ ; The aliases to control what is run in CI ; It can either be the full test suite, or focus on a single test -; Aliases ci1 and ci2 are useful to split the test suite into -; subparts, for platforms such as Cygwin which are too slow (alias (name ci) (package multicoretests) From 665555c37969d1c1dc735cd09b9b443d3b36f3cd Mon Sep 17 00:00:00 2001 From: Samuel Hym Date: Tue, 10 Sep 2024 19:02:45 +0200 Subject: [PATCH 3/5] Define the `testsuite` and `internaltests` aliases Split the `runtest` root alias into `testsuite` and `internaltests` Make `ci` point by default to `testsuite` --- dune | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dune b/dune index 52ec2c717..23c9304ff 100644 --- a/dune +++ b/dune @@ -16,13 +16,27 @@ (package multicoretests) (deps (alias src/default))) +; The main test alias +(alias + (name testsuite) + (package multicoretests) + (deps + (alias_rec src/runtest))) + +; The internal tests alias +(alias + (name internaltests) + (package multicoretests) + (deps + (alias_rec test/runtest))) + ; The aliases to control what is run in CI ; It can either be the full test suite, or focus on a single test (alias (name ci) (package multicoretests) (deps - (alias_rec %{env:DUNE_CI_ALIAS=runtest}))) + (alias_rec %{env:DUNE_CI_ALIAS=testsuite}))) ; (alias_rec focusedtest))) ; @focusedtest From 6662af3dcbb8d1b9ae2474f76d2ffbd7ecd415f1 Mon Sep 17 00:00:00 2001 From: Samuel Hym Date: Wed, 11 Sep 2024 12:16:00 +0200 Subject: [PATCH 4/5] Use the `testsuite` and `internaltests` aliases in CI --- .github/runner.sh | 2 +- .github/workflows/common.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/runner.sh b/.github/runner.sh index 519975e7d..1d88a8ab3 100755 --- a/.github/runner.sh +++ b/.github/runner.sh @@ -203,7 +203,7 @@ case "$1" in ;; internaltests) cd "$MULTICORETESTSDIR" - dune runtest -j1 --no-buffer --display=quiet --cache=disabled --error-reporting=twice test/ + dune build @internaltests -j1 --no-buffer --display=quiet --cache=disabled --error-reporting=twice ;; *) fatal "Unknown command '$1'" diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 939a75e12..915e4bfc9 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -36,7 +36,7 @@ on: dune_alias: description: 'dune alias that should be built in the main step' type: string - default: 'runtest' + default: 'testsuite' compiler_repository: description: 'Repository from which to fetch the compiler' type: string From cd5b374a7b3e6b0217bf808746fc005995260a50 Mon Sep 17 00:00:00 2001 From: Samuel Hym Date: Wed, 11 Sep 2024 12:19:56 +0200 Subject: [PATCH 5/5] Drop the v=0 parameter in CI debug runs To avoid getting a different output in internal expect tests (due to the `debug mode` message), force `v=0` into `OCAMLRUNPARAM` (and default its value to `b,v=0`) --- .github/workflows/linux-500-debug.yml | 2 +- .github/workflows/linux-51x-debug.yml | 2 +- .github/workflows/linux-520-debug.yml | 2 +- .github/workflows/linux-530-trunk-debug.yml | 2 +- .github/workflows/linux-540-trunk-debug.yml | 2 +- test/dune | 24 +++++++++++++-------- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linux-500-debug.yml b/.github/workflows/linux-500-debug.yml index 4671b67a1..79d1fe826 100644 --- a/.github/workflows/linux-500-debug.yml +++ b/.github/workflows/linux-500-debug.yml @@ -12,5 +12,5 @@ jobs: with: compiler_ref: refs/tags/5.0.0 dune_profile: 'debug-runtime' - runparam: 's=4096,v=0,V=1' + runparam: 's=4096,V=1' timeout: 240 diff --git a/.github/workflows/linux-51x-debug.yml b/.github/workflows/linux-51x-debug.yml index ab29d0b8f..7d60ed721 100644 --- a/.github/workflows/linux-51x-debug.yml +++ b/.github/workflows/linux-51x-debug.yml @@ -12,5 +12,5 @@ jobs: with: compiler_ref: refs/tags/5.1.1 dune_profile: 'debug-runtime' - runparam: 's=4096,v=0,V=1' + runparam: 's=4096,V=1' timeout: 240 diff --git a/.github/workflows/linux-520-debug.yml b/.github/workflows/linux-520-debug.yml index 757b3fedd..568cce86c 100644 --- a/.github/workflows/linux-520-debug.yml +++ b/.github/workflows/linux-520-debug.yml @@ -16,5 +16,5 @@ jobs: with: compiler_ref: refs/tags/5.2.0 dune_profile: 'debug-runtime' - runparam: 's=4096,v=0,V=1' + runparam: 's=4096,V=1' timeout: 240 diff --git a/.github/workflows/linux-530-trunk-debug.yml b/.github/workflows/linux-530-trunk-debug.yml index 78c6b32cd..03728baa5 100644 --- a/.github/workflows/linux-530-trunk-debug.yml +++ b/.github/workflows/linux-530-trunk-debug.yml @@ -16,5 +16,5 @@ jobs: with: compiler_ref: refs/heads/5.3 dune_profile: 'debug-runtime' - runparam: 's=4096,v=0,V=1' + runparam: 's=4096,V=1' timeout: 240 diff --git a/.github/workflows/linux-540-trunk-debug.yml b/.github/workflows/linux-540-trunk-debug.yml index 3f5877301..5c65c4e22 100644 --- a/.github/workflows/linux-540-trunk-debug.yml +++ b/.github/workflows/linux-540-trunk-debug.yml @@ -16,5 +16,5 @@ jobs: with: compiler_ref: refs/heads/trunk dune_profile: 'debug-runtime' - runparam: 's=4096,v=0,V=1' + runparam: 's=4096,V=1' timeout: 240 diff --git a/test/dune b/test/dune index be80d1218..3658ae245 100644 --- a/test/dune +++ b/test/dune @@ -12,8 +12,9 @@ (package qcheck-multicoretests-util) (libraries qcheck-multicoretests-util) (action - (setenv MCTUTILS_TRUNCATE "" - (run %{dep:util_pp.exe})))) + (setenv OCAMLRUNPARAM "%{env:OCAMLRUNPARAM=b},v=0" + (setenv MCTUTILS_TRUNCATE "" + (run %{dep:util_pp.exe}))))) (rule (alias runtest) @@ -21,8 +22,9 @@ (action (progn (with-outputs-to util_pp_trunc150.output - (setenv MCTUTILS_TRUNCATE 150 - (run %{dep:util_pp.exe}))) + (setenv OCAMLRUNPARAM "%{env:OCAMLRUNPARAM=b},v=0" + (setenv MCTUTILS_TRUNCATE 150 + (run %{dep:util_pp.exe})))) (diff? util_pp_trunc150.expected util_pp_trunc150.output)))) (rule @@ -31,8 +33,9 @@ (action (progn (with-outputs-to util_pp_trunc79.output - (setenv MCTUTILS_TRUNCATE 79 - (run %{dep:util_pp.exe}))) + (setenv OCAMLRUNPARAM "%{env:OCAMLRUNPARAM=b},v=0" + (setenv MCTUTILS_TRUNCATE 79 + (run %{dep:util_pp.exe})))) (diff? util_pp_trunc79.expected util_pp_trunc79.output)))) (rule @@ -41,8 +44,9 @@ (action (progn (with-outputs-to util_pp_trunc5.output - (setenv MCTUTILS_TRUNCATE 5 - (run %{dep:util_pp.exe}))) + (setenv OCAMLRUNPARAM "%{env:OCAMLRUNPARAM=b},v=0" + (setenv MCTUTILS_TRUNCATE 5 + (run %{dep:util_pp.exe})))) (diff? util_pp_trunc5.expected util_pp_trunc5.output)))) (executable @@ -91,7 +95,9 @@ (package qcheck-stm) (libraries qcheck-stm.sequential threads.posix) (action - (with-accepted-exit-codes 1 (run ./%{test} --seed 229109553)))) + (with-accepted-exit-codes 1 + (setenv OCAMLRUNPARAM "%{env:OCAMLRUNPARAM=b},v=0" + (run ./%{test} --seed 229109553))))) (test (name stm_next_state_exc)