Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
17 changes: 14 additions & 3 deletions check/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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?
Expand Down Expand Up @@ -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 = []
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down
Loading