diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fca60c9d6..8730238b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,15 +147,20 @@ jobs: working-directory: project/${{ matrix.target.name }}/${{ matrix.target.subdir }} run: | opam exec -- easycrypt runtest \ + -report report.log \ ${{ matrix.target.options }} \ ${{ matrix.target.config }} \ ${{ matrix.target.scenario }} + - name: Compute real-path to report.log + if: always() + run: | + echo "report=$(realpath project/${{ matrix.target.name }}/${{ matrix.target.subdir }})/report.log" >> $GITHUB_ENV - uses: actions/upload-artifact@v4 name: Upload report.log if: always() with: name: report.log (${{ matrix.target.name }}) - path: report.log + path: ${{ env.report }} if-no-files-found: ignore external-status: diff --git a/src/ec.ml b/src/ec.ml index 57a930cad..137957557 100644 --- a/src/ec.ml +++ b/src/ec.ml @@ -291,6 +291,11 @@ let main () = "runtest"; Format.sprintf "--bin=%s" Sys.executable_name; ] + @ Option.to_list ( + Option.map + (Format.sprintf "--report=%s") + input.runo_report + ) @ List.map (Format.sprintf "--bin-args=%s") ecargs @ [input.runo_input] @ input.runo_scenarios diff --git a/src/ecOptions.ml b/src/ecOptions.ml index b10a935b6..0cb453de0 100644 --- a/src/ecOptions.ml +++ b/src/ecOptions.ml @@ -33,6 +33,7 @@ and cli_option = { and run_option = { runo_input : string; runo_scenarios : string list; + runo_report : string option; runo_provers : prv_options; } @@ -348,6 +349,7 @@ let specs = { ("runtest", "Run a test-suite", [ `Group "loader"; `Group "provers"; + `Spec ("report", `String, "dump result to "); ]); ("why3config", "Configure why3", []); @@ -503,6 +505,7 @@ let cmp_options_of_values ini values input = let runtest_options_of_values ini values (input, scenarios) = { runo_input = input; runo_scenarios = scenarios; + runo_report = get_string "report" values; runo_provers = prv_options_of_values ini values; } (* -------------------------------------------------------------------- *) diff --git a/src/ecOptions.mli b/src/ecOptions.mli index b53b30b67..3c998bf05 100644 --- a/src/ecOptions.mli +++ b/src/ecOptions.mli @@ -29,6 +29,7 @@ and cli_option = { and run_option = { runo_input : string; runo_scenarios : string list; + runo_report : string option; runo_provers : prv_options; }