Skip to content

Commit

Permalink
Use the custom runner for the test suite
Browse files Browse the repository at this point in the history
Unfortunately, syntax such as `%{dep:%{test}}` is not understood in an
action, and simply using: `(action (run runner %{test}))` does not add
the test executable to the dependencies of the action, so dune does not
build it

We keep the standard runner for the _internal_ tests, as the custom
runner would bring no benefit there
  • Loading branch information
shym committed Feb 28, 2023
1 parent 8964281 commit a5a878c
Show file tree
Hide file tree
Showing 20 changed files with 62 additions and 53 deletions.
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}))
)
4 changes: 2 additions & 2 deletions src/stack/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,7 +16,7 @@
(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/stack/%{test} from the test suite\n\n"))
)

2 changes: 1 addition & 1 deletion src/sys/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/thread/dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(package multicoretests)
(libraries threads qcheck-core util)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:thread_joingraph.exe}))
)

(test
Expand All @@ -17,5 +17,5 @@
(package multicoretests)
(libraries threads qcheck-core util)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:thread_createtree.exe}))
)
2 changes: 1 addition & 1 deletion src/threadomain/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
(package multicoretests)
(libraries util qcheck-core threads)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
(action (run runner %{dep:threadomain.exe}))
)
Loading

0 comments on commit a5a878c

Please sign in to comment.