File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change 3030 repeats :
3131 description : ' Number of test attempts'
3232 type : string
33- default : ' '
33+ default : ' 10 '
3434 compiler_commit :
3535 description : ' Version (commit) of the OCaml compiler to use'
3636 type : string
@@ -107,19 +107,16 @@ jobs:
107107 run : opam exec -- dune runtest -j1 --no-buffer --display=quiet --cache=disabled --error-reporting=twice
108108 if : inputs.only_test == ''
109109
110- - name : Run the one test
111- run : opam exec -- dune exec "$ONLY_TEST" -- -v
112- if : inputs.only_test != '' && inputs.seed == '' && inputs.repeats == ''
113-
114- - name : Run the one test with a fixed seed
115- run : opam exec -- dune exec "$ONLY_TEST" -- -v -s "$SEED"
116- if : inputs.only_test != '' && inputs.seed != '' && inputs.repeats == ''
117-
118- - name : Repeat the one test with a fixed seed
110+ - name : Run only one test
119111 run : |
120112 failures=0
121- for i in `seq "$REPEATS"; do
122- opam exec -- dune exec "$ONLY_TEST" -- -v -s "$SEED" || failures=$((failures + 1))
113+ for i in `seq "$REPEATS"`; do
114+ if [ -n "$SEED" ]; then
115+ opam exec -- dune exec "$ONLY_TEST" -- -v -s "$SEED" || failures=$((failures + 1))
116+ else
117+ opam exec -- dune exec "$ONLY_TEST" -- -v || failures=$((failures + 1))
118+ fi
123119 done
124- exit "$failures"
125- if : inputs.only_test != '' && inputs.seed != '' && inputs.repeats != ''
120+ echo "Test failed $failures times"
121+ [ "$failures" = 0 ]
122+ if : inputs.only_test != ''
You can’t perform that action at this time.
0 commit comments