Skip to content

Commit

Permalink
Merge pull request #250 from ocaml-multicore/use-test-stanzas
Browse files Browse the repository at this point in the history
Simplify dune rules into (test ...)s and add package annotations
  • Loading branch information
jmid authored Dec 7, 2022
2 parents 3ddac52 + 59e9332 commit add6d50
Show file tree
Hide file tree
Showing 18 changed files with 265 additions and 390 deletions.
41 changes: 17 additions & 24 deletions src/array/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,33 @@
(deps
stm_tests.exe
lin_tests.exe ;; currently not run on CI
lin_tests_dsl.exe))
lin_tests_dsl.exe)
)

(executable
(test
(name stm_tests)
(modules stm_tests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(package multicoretests)
(deps stm_tests.exe)
(action (run ./%{deps} --verbose)))
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)

(executable
(test
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(flags (:standard -w -27))
(libraries qcheck-lin.domain)
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq)))
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq))
; (action (run %{test} --verbose))
(action (echo "Skipping src/array/%{test} from the test suite\n\n"))
)

; (rule
; (alias runtest)
; (package multicoretests)
; (deps lin_tests.exe)
; (action (run ./%{deps} --verbose)))

(executable
(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(libraries qcheck-lin.domain))

(rule
(alias runtest)
(package multicoretests)
(deps lin_tests_dsl.exe)
(action (run ./%{deps} --verbose)))
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
)
43 changes: 17 additions & 26 deletions src/atomic/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,37 @@
(deps
stm_tests.exe
lin_tests.exe ;; currently not run on CI
lin_tests_dsl.exe))

lin_tests_dsl.exe)
)

;; STM_sequential and STM_domain test of Atomic

(executable
(test
(name stm_tests)
(modules stm_tests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(package multicoretests)
(deps stm_tests.exe)
(action (run ./%{deps} --verbose)))

(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)

;; Linearization tests of Atomic, utilizing ppx_deriving_qcheck

(executable
(test
(name lin_tests)
(modules lin_tests)
(package multicoretests)
(flags (:standard -w -27))
(libraries qcheck-lin.domain)
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq)))

; (rule
; (alias runtest)
; (package multicoretests)
; (deps lin_tests.exe)
; (action (run ./%{deps} --verbose)))
(preprocess (pps ppx_deriving_qcheck ppx_deriving.show ppx_deriving.eq))
; (action (run %{test} --verbose))
(action (echo "Skipping src/atomic/%{test} from the test suite\n\n"))
)

(executable
(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(libraries qcheck-lin.domain))

(rule
(alias runtest)
(package multicoretests)
(deps lin_tests_dsl.exe)
(action (run ./%{deps} --verbose)))
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
)
28 changes: 14 additions & 14 deletions src/bigarray/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
(package multicoretests)
(deps
stm_tests.exe ;; currently not run on CI
lin_tests_dsl.exe))
lin_tests_dsl.exe)
)

(executable
(name lin_tests_dsl)
(modules lin_tests_dsl)
(libraries qcheck-lin.domain))

(executable
(test
(name stm_tests)
(modules stm_tests)
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess
(pps ppx_deriving.show)))
(preprocess (pps ppx_deriving.show))
; (action (run %{test} --verbose))
(action (echo "Skipping src/bigarray/%{test} from the test suite\n\n"))
)

(rule
(alias runtest)
(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(package multicoretests)
(deps lin_tests_dsl.exe)
(action
(run ./%{deps} --verbose)))
(libraries qcheck-lin.domain)
(action (run %{test} --verbose))
)
17 changes: 7 additions & 10 deletions src/buffer/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
(alias
(name default)
(package multicoretests)
(deps stm_tests.exe))

(deps stm_tests.exe)
)

(executable
(test
(name stm_tests)
(modules stm_tests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(package multicoretests)
(deps stm_tests.exe)
(action (run ./%{deps} --verbose)))
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)
31 changes: 11 additions & 20 deletions src/bytes/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,19 @@

;; Linearization tests

(executable
(name lin_tests_dsl)
(modules lin_tests_dsl)
(libraries qcheck-lin.domain qcheck-lin.thread))

(executable
(test
(name stm_tests)
(modules stm_tests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess
(pps ppx_deriving.show)))

(rule
(alias runtest)
(package multicoretests)
(deps stm_tests.exe)
(action
(run ./%{deps} --verbose)))
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)

(rule
(alias runtest)
(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(package multicoretests)
(deps lin_tests_dsl.exe)
(action
(run ./%{deps} --verbose)))
(libraries qcheck-lin.domain qcheck-lin.thread)
(action (run %{test} --verbose))
)
30 changes: 12 additions & 18 deletions src/domain/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,25 @@
(alias
(name default)
(package multicoretests)
(deps domain_joingraph.exe domain_spawntree.exe))

(deps domain_joingraph.exe domain_spawntree.exe)
)

;; Tests of Domain's spawn functionality (non-STM)

(executable
(test
(name domain_joingraph)
(modules domain_joingraph)
(libraries util qcheck-core qcheck-core.runner)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(package multicoretests)
(deps domain_joingraph.exe)
(action (run ./%{deps} --verbose)))
(libraries util qcheck-core qcheck-core.runner)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)

(executable
(test
(name domain_spawntree)
(modules domain_spawntree)
(libraries util qcheck-core qcheck-core.runner)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(deps domain_spawntree.exe)
(package multicoretests)
(action (run ./%{deps} --verbose)))
(libraries util qcheck-core qcheck-core.runner)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)
55 changes: 22 additions & 33 deletions src/domainslib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,47 @@
(name default)
(package multicoretests)
(deps
chan_stm_tests.exe
task_one_dep.exe
task_more_deps.exe
task_parallel.exe))
task_parallel.exe
chan_stm_tests.exe)
)

;; tests of Domainslib.Task's async functionality (non-STM)

(executable
(test
(name task_one_dep)
(modules task_one_dep)
(libraries util qcheck-core qcheck-core.runner domainslib)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(package multicoretests)
(deps task_one_dep.exe)
(action (run ./%{deps} --verbose)))
(libraries util qcheck-core qcheck-core.runner domainslib)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)

(executable
(test
(name task_more_deps)
(modules task_more_deps)
(libraries util qcheck-core qcheck-core.runner domainslib)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(deps task_more_deps.exe)
(package multicoretests)
(action (run ./%{deps} --verbose)))
(libraries util qcheck-core qcheck-core.runner domainslib)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)

(executable
(test
(name task_parallel)
(modules task_parallel)
(libraries util qcheck-core qcheck-core.runner domainslib))

(rule
(alias runtest)
(package multicoretests)
(deps task_parallel.exe)
(action (run ./%{deps} --verbose)))

(libraries util qcheck-core qcheck-core.runner domainslib)
(action (run %{test} --verbose))
)

;; STM_seq and STM_domain test of Domainslib.Chan

(executable
(test
(name chan_stm_tests)
(modules chan_stm_tests)
(package multicoretests)
(libraries qcheck-stm.sequential qcheck-stm.domain domainslib)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(deps chan_stm_tests.exe)
(action (run ./%{deps} --verbose)))
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)
24 changes: 9 additions & 15 deletions src/ephemeron/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,19 @@
(name default)
(deps stm_tests.exe lin_tests_dsl.exe))

(executable
(test
(name stm_tests)
(modules stm_tests)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show)))

(rule
(alias runtest)
(package multicoretests)
(deps stm_tests.exe)
(action (run ./%{deps} --verbose)))
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show))
(action (run %{test} --verbose))
)

(executable
(test
(name lin_tests_dsl)
(modules lin_tests_dsl)
(libraries qcheck-lin.domain qcheck-lin.thread))

(rule
(alias runtest)
(package multicoretests)
(deps lin_tests_dsl.exe)
(action (run ./%{deps} --verbose)))
(libraries qcheck-lin.domain qcheck-lin.thread)
(action (run %{test} --verbose))
)
Loading

0 comments on commit add6d50

Please sign in to comment.