File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 77 description : ' Branch or tag of ocaml/ocaml to use as compiler'
88 type : string
99 default : ' 5.0.0-beta1'
10+ only_test :
11+ description : ' Only test to run (eg “src/array/lin_tests.exe”); whole suite is run if empty'
12+ type : string
13+ default : ' '
14+ seed :
15+ description : ' Seed for the only test'
16+ type : string
17+ default : ' '
18+ repeats :
19+ description : ' Number of test attempts'
20+ type : string
21+ default : ' 2'
1022
1123jobs :
1224 build :
1325 runs-on : windows-latest
1426
1527 env :
1628 COMPILER : ${{ inputs.compiler }}
29+ ONLY_TEST : ${{ inputs.only_test }}
30+ SEED : ${{ inputs.seed }}
31+ REPEATS : ${{ inputs.repeats }}
1732 QCHECK_MSG_INTERVAL : ' 60'
1833
1934 steps :
5570
5671 - name : Build the test suite
5772 run : opam exec --switch=ci -- dune build
73+ if : inputs.only_test == ''
5874
5975 - name : Run the test suite
6076 run : opam exec --switch=ci -- dune runtest -j1 --no-buffer --display=quiet --cache=disabled --error-reporting=twice
77+ if : inputs.only_test == ''
78+
79+ - name : Run only one test
80+ run : |
81+ $ErrorActionPreference = 'Continue'
82+ $failures = 0
83+ for($i = 1; $i -le "${env:REPEATS}"; $i++) {
84+ if("${env:SEED}" -eq "") {
85+ opam exec --switch=ci -- dune exec "${env:ONLY_TEST}" -- -v
86+ if($? -eq 0) { $failures += 1 }
87+ } else {
88+ opam exec --switch=ci -- dune exec "${env:ONLY_TEST}" -- -v -s "${env:SEED}"
89+ if($? -eq 0) { $failures += 1 }
90+ }
91+ }
92+ echo "Test failed $failures times"
93+ if : inputs.only_test != ''
You can’t perform that action at this time.
0 commit comments