Skip to content

Commit

Permalink
Add quiet (-q) argument to update_suite (issue #1392)
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Apr 22, 2024
1 parent c474435 commit 1087627
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 24 deletions.
9 changes: 5 additions & 4 deletions scripts/update_suite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def clearline
#Command line parameters
#Either only run a single test, or
#"future" will also run tests we normally skip
quiet = ARGV.last == "-q" && ARGV.pop
$dump = ARGV.last == "-d" && ARGV.pop
sequential = ARGV.last == "-s" && ARGV.pop
marshal = ARGV.last == "-m" && ARGV.pop
Expand Down Expand Up @@ -608,9 +609,9 @@ def run ()
dirname = File.dirname(filepath)
filename = File.basename(filepath)
Dir.chdir(dirname)
clearline
clearline unless quiet
id = "#{p.id} #{p.group}/#{p.name}"
print "Testing #{id}"
print "Testing #{id}" unless quiet
begin
Dir.mkdir(File.join($testresults, p.group)) unless Dir.exist?(File.join($testresults, p.group))
rescue
Expand All @@ -635,7 +636,7 @@ def run ()
end
end
$alliswell = projects.map{|p| p.testset.ok}.all?
clearline
clearline unless quiet

#Outputting
header = <<END
Expand Down Expand Up @@ -688,7 +689,7 @@ def run ()
puts ("Results: " + theresultfile)
end
if $alliswell then
puts "No errors :)".green
puts "No errors :)".green unless quiet
else
puts "#{$failed.length} test(s) failed: #{$failed}".red
end
Expand Down
4 changes: 2 additions & 2 deletions tests/incremental/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
(action
(chdir ../..
(progn
(run %{update_suite} -i) ; with AST comparison
(run %{update_suite} -c))))) ; with CFG comparison
(run %{update_suite} -i -q) ; with AST comparison
(run %{update_suite} -c -q))))) ; with CFG comparison

(cram
(applies_to :whole_subtree)
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/24-octagon/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
(:update_suite ../../../scripts/update_suite.rb)
(glob_files ??-*.c))
(locks /update_suite)
(action (chdir ../../.. (run %{update_suite} group octagon))))
(action (chdir ../../.. (run %{update_suite} group octagon -q))))
2 changes: 1 addition & 1 deletion tests/regression/36-apron/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
(:update_suite ../../../scripts/update_suite.rb)
(glob_files ??-*.c))
(locks /update_suite)
(action (chdir ../../.. (run %{update_suite} group apron))))
(action (chdir ../../.. (run %{update_suite} group apron -q))))
2 changes: 1 addition & 1 deletion tests/regression/46-apron2/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
(:update_suite ../../../scripts/update_suite.rb)
(glob_files ??-*.c))
(locks /update_suite)
(action (chdir ../../.. (run %{update_suite} group apron2))))
(action (chdir ../../.. (run %{update_suite} group apron2 -q))))
2 changes: 1 addition & 1 deletion tests/regression/52-apron-mukherjee/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
(:update_suite ../../../scripts/update_suite.rb)
(glob_files ??-*.c))
(locks /update_suite)
(action (chdir ../../.. (run %{update_suite} group apron-mukherjee))))
(action (chdir ../../.. (run %{update_suite} group apron-mukherjee -q))))
20 changes: 10 additions & 10 deletions tests/regression/56-witness/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
(action
(chdir ../../..
(progn
(run %{update_suite} apron-unassume-interval)
(run %{update_suite} apron-unassume-branch)
(run %{update_suite} apron-unassume-global)
(run %{update_suite} apron-unassume-priv)
(run %{update_suite} apron-unassume-priv2)
(run %{update_suite} apron-unassume-strengthening)
(run %{update_suite} mine-tutorial-ex4.10)
(run %{update_suite} hh-ex3)
(run %{update_suite} bh-ex1-poly)
(run %{update_suite} apron-unassume-precheck)))))
(run %{update_suite} apron-unassume-interval -q)
(run %{update_suite} apron-unassume-branch -q)
(run %{update_suite} apron-unassume-global -q)
(run %{update_suite} apron-unassume-priv -q)
(run %{update_suite} apron-unassume-priv2 -q)
(run %{update_suite} apron-unassume-strengthening -q)
(run %{update_suite} mine-tutorial-ex4.10 -q)
(run %{update_suite} hh-ex3 -q)
(run %{update_suite} bh-ex1-poly -q)
(run %{update_suite} apron-unassume-precheck -q)))))

(cram
(deps (glob_files *.c) (glob_files ??-*.yml)))
2 changes: 1 addition & 1 deletion tests/regression/63-affeq/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
(:update_suite ../../../scripts/update_suite.rb)
(glob_files ??-*.c))
(locks /update_suite)
(action (chdir ../../.. (run %{update_suite} group affeq))))
(action (chdir ../../.. (run %{update_suite} group affeq -q))))
2 changes: 1 addition & 1 deletion tests/regression/77-lin2vareq/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
(:update_suite ../../../scripts/update_suite.rb)
(glob_files ??-*.c))
(locks /update_suite)
(action (chdir ../../.. (run %{update_suite} group lin2vareq))))
(action (chdir ../../.. (run %{update_suite} group lin2vareq -q))))
2 changes: 1 addition & 1 deletion tests/regression/78-termination/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
(:update_suite ../../../scripts/update_suite.rb)
(glob_files ??-*.c))
(locks /update_suite)
(action (chdir ../../.. (run %{update_suite} group termination))))
(action (chdir ../../.. (run %{update_suite} group termination -q))))
2 changes: 1 addition & 1 deletion tests/regression/dune
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(glob_files_rec 56-witness/??-*.yml) ; excluding witness.yml, etc. which might exist due to running update_suite outside of dune
(source_tree ../../linux-headers))
(locks /update_suite)
(action (chdir ../.. (run %{update_suite}))))
(action (chdir ../.. (run %{update_suite} -q))))

(cram
(applies_to :whole_subtree)
Expand Down

0 comments on commit 1087627

Please sign in to comment.