From 1087627df9524a09aa12f646213bc77bccbc6b63 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 22 Apr 2024 15:44:03 +0300 Subject: [PATCH 1/7] Add quiet (-q) argument to update_suite (issue #1392) --- scripts/update_suite.rb | 9 +++++---- tests/incremental/dune | 4 ++-- tests/regression/24-octagon/dune | 2 +- tests/regression/36-apron/dune | 2 +- tests/regression/46-apron2/dune | 2 +- tests/regression/52-apron-mukherjee/dune | 2 +- tests/regression/56-witness/dune | 20 ++++++++++---------- tests/regression/63-affeq/dune | 2 +- tests/regression/77-lin2vareq/dune | 2 +- tests/regression/78-termination/dune | 2 +- tests/regression/dune | 2 +- 11 files changed, 25 insertions(+), 24 deletions(-) diff --git a/scripts/update_suite.rb b/scripts/update_suite.rb index 70be6b6d85..208de14066 100755 --- a/scripts/update_suite.rb +++ b/scripts/update_suite.rb @@ -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 @@ -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 @@ -635,7 +636,7 @@ def run () end end $alliswell = projects.map{|p| p.testset.ok}.all? -clearline +clearline unless quiet #Outputting header = < Date: Mon, 22 Apr 2024 16:14:48 +0300 Subject: [PATCH 2/7] Use dot output for update_suite when quiet (issue #1392) --- scripts/update_suite.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/update_suite.rb b/scripts/update_suite.rb index 208de14066..18e3c5d712 100755 --- a/scripts/update_suite.rb +++ b/scripts/update_suite.rb @@ -612,6 +612,7 @@ def run () clearline unless quiet id = "#{p.id} #{p.group}/#{p.name}" print "Testing #{id}" unless quiet + print "." if quiet begin Dir.mkdir(File.join($testresults, p.group)) unless Dir.exist?(File.join($testresults, p.group)) rescue @@ -636,7 +637,7 @@ def run () end end $alliswell = projects.map{|p| p.testset.ok}.all? -clearline unless quiet +clearline #Outputting header = < Date: Mon, 22 Apr 2024 16:15:06 +0300 Subject: [PATCH 3/7] Add description prefix to quiet update_suite (issue #1392) --- scripts/update_suite.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/update_suite.rb b/scripts/update_suite.rb index 18e3c5d712..64022f0c17 100755 --- a/scripts/update_suite.rb +++ b/scripts/update_suite.rb @@ -29,6 +29,7 @@ def pink; colorize(35) end def cyan; colorize(36) end def white; colorize(37) end def bg_black; colorize(40) end # gray for me + def bold; colorize(1) end def gray; colorize("38;5;240") end end class Array @@ -86,10 +87,18 @@ def clearline future = thegroup.start_with?"-" future = !future # why does negation above fail? only = nil + descr = "group #{thegroup}" else future = false + if only.nil? then + descr = "" + else + descr = only + end end +print "update_suite #{descr}: ".bold + $testresults = File.expand_path("tests/suite_result") begin Dir.mkdir($testresults) From 56bbf00c87891f6f9f3f7eb96ea9de6af7433719 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 22 Apr 2024 16:20:14 +0300 Subject: [PATCH 4/7] Add prefix to unit test output (issue #1392) --- tests/unit/mainTest.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/mainTest.ml b/tests/unit/mainTest.ml index 2b6cb3a538..4f071ea25c 100644 --- a/tests/unit/mainTest.ml +++ b/tests/unit/mainTest.ml @@ -15,4 +15,6 @@ let all_tests = IntOpsTest.tests; ] -let () = run_test_tt_main all_tests +let () = + print_string "\027[0;1munit: \027[0;0;00m"; + run_test_tt_main all_tests From ecb7fc224783c9f861ed3c90102438b5b0a2fbb8 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 22 Apr 2024 16:20:33 +0300 Subject: [PATCH 5/7] Remove empty space from update_suite prefix (issue #1392) --- scripts/update_suite.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/update_suite.rb b/scripts/update_suite.rb index 64022f0c17..5f269ee47e 100755 --- a/scripts/update_suite.rb +++ b/scripts/update_suite.rb @@ -87,17 +87,17 @@ def clearline future = thegroup.start_with?"-" future = !future # why does negation above fail? only = nil - descr = "group #{thegroup}" + descr = " group #{thegroup}" else future = false if only.nil? then descr = "" else - descr = only + descr = " #{only}" end end -print "update_suite #{descr}: ".bold +print "update_suite#{descr}: ".bold $testresults = File.expand_path("tests/suite_result") begin From 3bf685cc0d8ccebc6cdb53f964f4cd3905da430f Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 22 Apr 2024 16:23:37 +0300 Subject: [PATCH 6/7] Add descriptions to incremental update_suite (issue #1392) --- scripts/update_suite.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/update_suite.rb b/scripts/update_suite.rb index 5f269ee47e..cc45095ae7 100755 --- a/scripts/update_suite.rb +++ b/scripts/update_suite.rb @@ -97,6 +97,12 @@ def clearline end end +if cfg then + descr = " incremental cfg" +elsif incremental then + descr = " incremental ast" +end + print "update_suite#{descr}: ".bold $testresults = File.expand_path("tests/suite_result") From 3eee39f9803cff7118c7a8bdbc3f447990d22090 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Wed, 24 Apr 2024 10:19:47 +0300 Subject: [PATCH 7/7] Add SKIP to 56-witness/45-apron-tracked-global-annot --- tests/regression/56-witness/45-apron-tracked-global-annot.c | 2 +- tests/regression/56-witness/dune | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/regression/56-witness/45-apron-tracked-global-annot.c b/tests/regression/56-witness/45-apron-tracked-global-annot.c index 6647e22079..0490c3321d 100644 --- a/tests/regression/56-witness/45-apron-tracked-global-annot.c +++ b/tests/regression/56-witness/45-apron-tracked-global-annot.c @@ -1,4 +1,4 @@ -// PARAM: --set ana.activated[+] apron --enable annotation.goblint_relation_track --set ana.activated[+] unassume --set witness.yaml.unassume 45-apron-tracked-global-annot.yml +// SKIP PARAM: --set ana.activated[+] apron --enable annotation.goblint_relation_track --set ana.activated[+] unassume --set witness.yaml.unassume 45-apron-tracked-global-annot.yml #include int g __attribute__((__goblint_relation_track__)) = 0; diff --git a/tests/regression/56-witness/dune b/tests/regression/56-witness/dune index 422a710175..7cb89fbe47 100644 --- a/tests/regression/56-witness/dune +++ b/tests/regression/56-witness/dune @@ -20,7 +20,8 @@ (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-precheck) + (run %{update_suite} apron-tracked-global-annot))))) (cram (deps (glob_files *.c) (glob_files ??-*.yml)))