diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dce6465e..aac538ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -230,7 +230,7 @@ jobs: run: make -C sources -j 4 ${{ matrix.bin }} - name: Test - run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --timeout 30 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} + run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --timeout 30 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} --fake-valgrind - name: Generate LCOV coverage data run: | diff --git a/check/check.rb b/check/check.rb index 2d082a3c..7084f438 100755 --- a/check/check.rb +++ b/check/check.rb @@ -266,7 +266,11 @@ def mpi? end def valgrind? - !FormTest.cfg.valgrind.nil? + if FormTest.cfg.fake_valgrind.nil? + !FormTest.cfg.valgrind.nil? + else + FormTest.cfg.fake_valgrind + end end def wordsize @@ -1147,12 +1151,13 @@ def delete(classname) # FORM configuration. class FormConfig - def initialize(form, mpirun, mpirun_opts, valgrind, valgrind_opts, wordsize, ncpu, timeout, retries, stat, full, verbose, show_newlines) + def initialize(form, mpirun, mpirun_opts, valgrind, valgrind_opts, fake_valgrind, wordsize, ncpu, timeout, retries, stat, full, verbose, show_newlines) @form = form @mpirun = mpirun @mpirun_opts = mpirun_opts @valgrind = valgrind @valgrind_opts = valgrind_opts + @fake_valgrind = fake_valgrind @ncpu = ncpu @timeout = timeout @retries = retries @@ -1174,7 +1179,7 @@ def initialize(form, mpirun, mpirun_opts, valgrind, valgrind_opts, wordsize, ncp @form_cmd = nil end - attr_reader :form, :mpirun, :mpirun_opts, :valgrind, :valgrind_opts, :ncpu, :timeout, :retries, :stat, :full, :verbose, :show_newlines, + attr_reader :form, :mpirun, :mpirun_opts, :valgrind, :valgrind_opts, :fake_valgrind, :ncpu, :timeout, :retries, :stat, :full, :verbose, :show_newlines, :form_bin, :mpirun_bin, :valgrind_bin, :valgrind_supp, :head, :wordsize, :form_cmd def serial? @@ -1446,6 +1451,7 @@ def main opts.enable_valgrind = false opts.valgrind = "valgrind" opts.valgrind_opts = nil + opts.fake_valgrind = nil opts.wordsize = nil opts.dir = nil opts.name_patterns = [] @@ -1482,6 +1488,10 @@ def main "Full test, ignoring pending") { opts.full = true } parser.on("--enable-valgrind", "Enable Valgrind") { opts.enable_valgrind = true } + parser.on("--fake-valgrind", + "Pretend to run under Valgrind") { opts.fake_valgrind = true } + parser.on("--fake-no-valgrind", + "Pretend not to run under Valgrind") { opts.fake_valgrind = false } parser.on("--valgrind BIN", "Use BIN as Valgrind executable") { |bin| opts.enable_valgrind = true; opts.valgrind = bin } parser.on("--valgrind-opts OPTS", @@ -1624,6 +1634,7 @@ def main opts.mpirun_opts, opts.enable_valgrind ? opts.valgrind : nil, opts.valgrind_opts, + opts.fake_valgrind, opts.wordsize, opts.ncpu, [opts.timeout, 1].max,