From b5460bd8674afe101188504f9d8555e9202522c6 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 18 May 2020 18:34:26 -0400 Subject: [PATCH] Travis-CI fixes --- .travis.yml | 75 +++++++++++++++++++++++++++++++++++--------- ci/test.sh | 20 ++++++++---- nodist/code_coverage | 17 ++++++++-- 3 files changed, 89 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index 56711e241..0f88621d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -93,8 +93,15 @@ jobs: dist: trusty compiler: gcc stage: test - name: "14.04 gcc test" - script: ci/test.sh all + name: "14.04 gcc distvlt" + script: ci/test.sh distvlt + - if: type = cron + dist: trusty + compiler: gcc + stage: test + name: "14.04 gcc vltmt" + script: ci/test.sh vltmt +# - if: type = cron dist: xenial compiler: gcc @@ -105,8 +112,15 @@ jobs: dist: xenial compiler: gcc stage: test - name: "16.04 gcc test" - script: ci/test.sh all + name: "16.04 gcc distvlt" + script: ci/test.sh distvlt + - if: type = cron + dist: xenial + compiler: gcc + stage: test + name: "16.04 gcc vltmt" + script: ci/test.sh vltmt +# - if: type = cron dist: bionic compiler: gcc @@ -117,8 +131,15 @@ jobs: dist: bionic compiler: gcc stage: test - name: "18.04 gcc test" - script: ci/test.sh all + name: "18.04 gcc distvlt" + script: ci/test.sh distvlt + - if: type = cron + dist: bionic + compiler: gcc + stage: test + name: "18.04 gcc vltmt" + script: ci/test.sh vltmt +# - if: type = cron dist: xenial compiler: clang @@ -129,8 +150,15 @@ jobs: dist: xenial compiler: clang stage: test - name: "16.04 clang test" - script: ci/test.sh all + name: "16.04 clang distvlt" + script: ci/test.sh distvlt + - if: type = cron + dist: xenial + compiler: clang + stage: test + name: "16.04 clang vltmt" + script: ci/test.sh vltmt +# - if: type = cron dist: focal compiler: clang @@ -141,21 +169,40 @@ jobs: dist: focal compiler: clang stage: test - name: "20.04 clang test" - script: ci/test.sh all + name: "20.04 clang distvlt" + script: ci/test.sh distvlt + - if: type = cron + dist: focal + compiler: clang + stage: test + name: "20.04 clang vltmt" + script: ci/test.sh vltmt +# # Cron coverage runs (two parts to avoid 50min timeout) - if: type = cron dist: focal compiler: gcc - stage: "Coverage Build Verilator" + stage: "Coverage Build" name: "Coverage" - script: ci/test.sh coverage1 + script: ci/test.sh coverage-build - if: type = cron dist: focal compiler: gcc - stage: "Coverage Test Verilator" + stage: "Coverage dist" name: "Coverage" - script: ci/test.sh coverage2 + script: ci/test.sh coverage-dist + - if: type = cron + dist: focal + compiler: gcc + stage: "Coverage vlt" + name: "Coverage" + script: ci/test.sh coverage-vlt + - if: type = cron + dist: focal + compiler: gcc + stage: "Coverage vltmt" + name: "Coverage" + script: ci/test.sh coverage-vltmt notifications: email: diff --git a/ci/test.sh b/ci/test.sh index 1a18d5098..44d023912 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -12,15 +12,15 @@ set -e export DRIVER_FLAGS='-j 0 --quiet --rerun' case $1 in - all) - make -C test_regress - ;; dist) make -C test_regress SCENARIOS=--dist ;; vlt) make -C test_regress SCENARIOS=--vlt ;; + distvlt) + make -C test_regress SCENARIOS="--dist --vlt" + ;; vltmt) make -C test_regress SCENARIOS=--vltmt ;; @@ -30,11 +30,19 @@ case $1 in vltmt1) make -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=1/2 ;; - coverage1) + coverage-build) nodist/code_coverage --stages 1-2 ;; - coverage2) - nodist/code_coverage + coverage-dist) + nodist/code_coverage --scenarios=--dist + bash <(curl -s https://codecov.io/bash) -f nodist/obj_dir/coverage/app_total.info + ;; + coverage-vlt) + nodist/code_coverage --scenarios=--vlt + bash <(curl -s https://codecov.io/bash) -f nodist/obj_dir/coverage/app_total.info + ;; + coverage-vltmt) + nodist/code_coverage --scenarios=--vltmt bash <(curl -s https://codecov.io/bash) -f nodist/obj_dir/coverage/app_total.info ;; *) diff --git a/nodist/code_coverage b/nodist/code_coverage index 4a9a1dc43..183e4c4af 100755 --- a/nodist/code_coverage +++ b/nodist/code_coverage @@ -30,6 +30,7 @@ $SIG{TERM} = sub { $Fork->kill_tree_all('TERM') if $Fork && $Fork->in_parent; di our $Opt_Fastcov = 0; # out of memory our $opt_stages = ''; +our $Opt_Scenarios; our %Opt_Stages; autoflush STDOUT 1; @@ -38,10 +39,11 @@ Getopt::Long::config("no_auto_abbrev"); if (! GetOptions( "debug" => sub { $Debug = 1; }, "<>" => sub { die "%Error: Unknown parameter: $_[0]\n"; }, + "scenarios=s" => \$Opt_Scenarios, # driver.pl scenarios "stages=s" => \$opt_stages, # starting stage number "stop!" => \$Opt_Stop, # stop/do not stop on error in tests )) { - die "%Error: Bad usage, try 'install_test --help'\n"; + die "%Error: Bad usage, try 'code_coverage --help'\n"; } { @@ -94,6 +96,7 @@ sub test { print "Stage 3: make tests (with coverage on)\n"; run("make examples"); run("make test_regress" + . ($Opt_Scenarios ? " SCENARIOS='".$Opt_Scenarios."'" : "") . ($Opt_Stop ? '' : ' || true')); travis_fold_end(); } @@ -377,9 +380,17 @@ This will rebuild the current object files. Displays this message and program version and exits. -=item -stage I +=item --scenarios I -Runs a specific stage (see the script). +Pass test scenarios onto driver.pl test harness. + +=item --stages I + +Runs a specific stage or range of stages (see the script). + +=item --stop + +Stop collecting data if tests fail. =back