Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (and use) a runner wrapping every test, to improve error reporting #303

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:
build-and-test:
env:
QCHECK_MSG_INTERVAL: '60'
TIMELOGDIR: ${{ github.workspace }}
TIMEOUT: ${{ inputs.timeout }}
DUNE_PROFILE: ${{ inputs.dune_profile }}
OCAMLRUNPARAM: ${{ inputs.runparam }}
ONLY_TEST: ${{ inputs.only_test }}
Expand Down Expand Up @@ -118,6 +120,10 @@ jobs:
echo "LDFLAGS=-L/usr/lib/i386-linux-gnu/" >> $GITHUB_ENV
fi

# Compute a deadline to respect time-out
echo "DEADLINE=$(date -d "now + $((TIMEOUT - 3)) minutes" +%s)" >> "$GITHUB_ENV"
cat "$GITHUB_ENV"

# Generate an OPAM config for a custom compiler
if [ -n "$CUSTOM_COMPILER_VERSION" ]; then
if [ -z "$CUSTOM_COMPILER_SRC" ]; then
Expand Down Expand Up @@ -203,6 +209,7 @@ jobs:
echo "OPAMJOBS=1" >> $GITHUB_ENV

- name: Install Multicore Tests dependencies
id: dependencies
run: |
opam install . --deps-only --with-test

Expand Down Expand Up @@ -272,3 +279,7 @@ jobs:
}
echo "Test failed $failures times"
if: env.ONLY_TEST != '' && runner.os == 'Windows'

- name: Summarize test run times
run: opam exec -- dune build @cat-times
if: "success() || (failure() && steps.dependencies.conclusion == 'success')"
6 changes: 3 additions & 3 deletions src/array/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)

(test
Expand All @@ -16,7 +16,7 @@
(flags (:standard -w -27))
(libraries qcheck-lin.domain)
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq))
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests.exe}))
(action (echo "Skipping src/array/%{test} from the test suite\n\n"))
)

Expand All @@ -25,5 +25,5 @@
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)
6 changes: 3 additions & 3 deletions src/atomic/dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)

;; Linearization tests of Atomic, utilizing ppx_deriving_qcheck
Expand All @@ -20,7 +20,7 @@
(flags (:standard -w -27))
(libraries qcheck-lin.domain)
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq))
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests.exe}))
(action (echo "Skipping src/atomic/%{test} from the test suite\n\n"))
)

Expand All @@ -29,5 +29,5 @@
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)
4 changes: 2 additions & 2 deletions src/bigarray/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
; (action (run %{test} --verbose))
; (action (run runner %{dep:stm_tests.exe}))
(action (echo "Skipping src/bigarray/%{test} from the test suite\n\n"))
)

Expand All @@ -15,5 +15,5 @@
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)
2 changes: 1 addition & 1 deletion src/buffer/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)
4 changes: 2 additions & 2 deletions src/bytes/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain qcheck-lin.thread)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)
4 changes: 2 additions & 2 deletions src/domain/dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(package multicoretests)
(libraries util qcheck-core qcheck-core.runner)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:domain_joingraph.exe}))
)

(test
Expand All @@ -17,5 +17,5 @@
(package multicoretests)
(libraries util qcheck-core qcheck-core.runner)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:domain_spawntree.exe}))
)
2 changes: 1 addition & 1 deletion src/dynlink/dune
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain dynlink libA libB)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)
4 changes: 2 additions & 2 deletions src/ephemeron/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain qcheck-lin.thread)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)
4 changes: 2 additions & 2 deletions src/floatarray/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)

(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)
6 changes: 3 additions & 3 deletions src/hashtbl/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)

(test
Expand All @@ -16,7 +16,7 @@
(flags (:standard -w -27))
(libraries qcheck-lin.domain)
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq))
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests.exe}))
(action (echo "Skipping src/hashtbl/%{test} from the test suite\n\n"))
)

Expand All @@ -25,5 +25,5 @@
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)
6 changes: 3 additions & 3 deletions src/io/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(package multicoretests)
;(flags (:standard -w -27))
(libraries qcheck-lin.domain)
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests.exe}))
(action (echo "Skipping src/io/%{test} from the test suite\n\n"))
)

Expand All @@ -23,7 +23,7 @@
(package multicoretests)
;(flags (:standard -w -27))
(libraries qcheck-lin.domain lin_tests_dsl_common_io)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl_domain.exe}))
)

(test
Expand All @@ -32,6 +32,6 @@
(package multicoretests)
;(flags (:standard -w -27))
(libraries qcheck-lin.thread lin_tests_dsl_common_io)
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests_dsl_thread.exe}))
(action (echo "Skipping src/io/%{test} from the test suite\n\n"))
)
6 changes: 3 additions & 3 deletions src/lazy/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)

(test
Expand All @@ -15,7 +15,7 @@
(package multicoretests)
(libraries qcheck-lin.domain)
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq))
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests.exe}))
(action (echo "Skipping src/lazy/%{test} from the test suite\n\n"))
)

Expand All @@ -24,6 +24,6 @@
(modules lin_tests_dsl)
(package multicoretests)
(libraries qcheck-lin.domain)
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests_dsl.exe}))
(action (echo "Skipping src/lazy/%{test} from the test suite\n\n"))
)
35 changes: 22 additions & 13 deletions src/neg_tests/dune
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
(modules stm_tests_sequential_ref)
(package multicoretests)
(libraries stm_tests_spec_ref qcheck-stm.sequential)
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests_sequential_ref.exe}))
)

(test
(name stm_tests_domain_ref)
(modules stm_tests_domain_ref)
(package multicoretests)
(libraries stm_tests_spec_ref qcheck-stm.domain)
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests_domain_ref.exe}))
)

(test
(name stm_tests_thread_ref)
(modules stm_tests_thread_ref)
(package multicoretests)
(libraries stm_tests_spec_ref qcheck-stm.thread)
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests_thread_ref.exe}))
)

(library
Expand All @@ -44,7 +44,7 @@
(package multicoretests)
(libraries CList qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests_conclist.exe}))
)

;; Linearization tests of ref and Clist with Lin
Expand All @@ -70,7 +70,7 @@
(package multicoretests)
(flags (:standard -w -27))
(libraries lin_tests_dsl_common)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl_domain.exe}))
)

(test
Expand All @@ -79,7 +79,7 @@
(package multicoretests)
(flags (:standard -w -27))
(libraries lin_tests_dsl_common qcheck-lin.thread)
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests_dsl_thread.exe}))
(action (echo "Skipping src/neg_tests/%{test} from the test suite\n\n"))
)

Expand All @@ -89,7 +89,7 @@
(package multicoretests)
(flags (:standard -w -27))
(libraries lin_tests_dsl_common qcheck-lin.effect)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl_effect.exe}))
)

;; Linearization tests of ref and Clist with Lin.Internal
Expand All @@ -100,17 +100,26 @@
(package multicoretests)
(flags (:standard -w -27))
(libraries lin_tests_common)
; (action (run %{test} --verbose))
; (action (run runner %{dep:lin_tests_domain.exe}))
(action (echo "Skipping src/neg_tests/%{test} from the test suite\n\n"))
)

(tests
(names lin_tests_thread_ref lin_tests_thread_conclist)
(modules lin_tests_thread_ref lin_tests_thread_conclist)
(test
(name lin_tests_thread_ref)
(modules lin_tests_thread_ref)
(package multicoretests)
(flags (:standard -w -27))
(libraries lin_tests_common qcheck-lin.thread)
(action (run runner %{dep:lin_tests_thread_ref.exe}))
)

(test
(name lin_tests_thread_conclist)
(modules lin_tests_thread_conclist)
(package multicoretests)
(flags (:standard -w -27))
(libraries lin_tests_common qcheck-lin.thread)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_thread_conclist.exe}))
)

(test
Expand All @@ -120,6 +129,6 @@
(flags (:standard -w -27))
(libraries lin_tests_common qcheck-lin.effect)
(preprocess (pps ppx_deriving.show ppx_deriving.eq))
; (action (run ./%{deps} --verbose))
; (action (run runner %{dep:lin_tests_effect.exe}))
(action (echo "Skipping src/neg_tests/%{test} from the test suite\n\n"))
)
4 changes: 2 additions & 2 deletions src/queue/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(package multicoretests)
(flags (:standard -w -27))
(libraries qcheck-lin.domain qcheck-lin.thread)
(action (run %{test} --verbose))
(action (run runner %{dep:lin_tests_dsl.exe}))
)

(test
Expand All @@ -16,6 +16,6 @@
(flags (:standard -w -27))
(libraries qcheck-lin.domain qcheck-lin.thread)
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq))
;(action (run %{test} --verbose))
;(action (run runner %{dep:lin_tests.exe}))
(action (echo "Skipping src/queue/%{test} from the test suite\n\n"))
)
2 changes: 1 addition & 1 deletion src/semaphore/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:stm_tests.exe}))
)
Loading