Travis-CI fixes

This commit is contained in:
Wilson Snyder 2020-05-18 18:34:26 -04:00
parent 53cde90c8f
commit b5460bd867
3 changed files with 89 additions and 23 deletions

View File

@ -93,8 +93,15 @@ jobs:
dist: trusty dist: trusty
compiler: gcc compiler: gcc
stage: test stage: test
name: "14.04 gcc test" name: "14.04 gcc distvlt"
script: ci/test.sh all 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 - if: type = cron
dist: xenial dist: xenial
compiler: gcc compiler: gcc
@ -105,8 +112,15 @@ jobs:
dist: xenial dist: xenial
compiler: gcc compiler: gcc
stage: test stage: test
name: "16.04 gcc test" name: "16.04 gcc distvlt"
script: ci/test.sh all 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 - if: type = cron
dist: bionic dist: bionic
compiler: gcc compiler: gcc
@ -117,8 +131,15 @@ jobs:
dist: bionic dist: bionic
compiler: gcc compiler: gcc
stage: test stage: test
name: "18.04 gcc test" name: "18.04 gcc distvlt"
script: ci/test.sh all 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 - if: type = cron
dist: xenial dist: xenial
compiler: clang compiler: clang
@ -129,8 +150,15 @@ jobs:
dist: xenial dist: xenial
compiler: clang compiler: clang
stage: test stage: test
name: "16.04 clang test" name: "16.04 clang distvlt"
script: ci/test.sh all 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 - if: type = cron
dist: focal dist: focal
compiler: clang compiler: clang
@ -141,21 +169,40 @@ jobs:
dist: focal dist: focal
compiler: clang compiler: clang
stage: test stage: test
name: "20.04 clang test" name: "20.04 clang distvlt"
script: ci/test.sh all 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) # Cron coverage runs (two parts to avoid 50min timeout)
- if: type = cron - if: type = cron
dist: focal dist: focal
compiler: gcc compiler: gcc
stage: "Coverage Build Verilator" stage: "Coverage Build"
name: "Coverage" name: "Coverage"
script: ci/test.sh coverage1 script: ci/test.sh coverage-build
- if: type = cron - if: type = cron
dist: focal dist: focal
compiler: gcc compiler: gcc
stage: "Coverage Test Verilator" stage: "Coverage dist"
name: "Coverage" 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: notifications:
email: email:

View File

@ -12,15 +12,15 @@ set -e
export DRIVER_FLAGS='-j 0 --quiet --rerun' export DRIVER_FLAGS='-j 0 --quiet --rerun'
case $1 in case $1 in
all)
make -C test_regress
;;
dist) dist)
make -C test_regress SCENARIOS=--dist make -C test_regress SCENARIOS=--dist
;; ;;
vlt) vlt)
make -C test_regress SCENARIOS=--vlt make -C test_regress SCENARIOS=--vlt
;; ;;
distvlt)
make -C test_regress SCENARIOS="--dist --vlt"
;;
vltmt) vltmt)
make -C test_regress SCENARIOS=--vltmt make -C test_regress SCENARIOS=--vltmt
;; ;;
@ -30,11 +30,19 @@ case $1 in
vltmt1) vltmt1)
make -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=1/2 make -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=1/2
;; ;;
coverage1) coverage-build)
nodist/code_coverage --stages 1-2 nodist/code_coverage --stages 1-2
;; ;;
coverage2) coverage-dist)
nodist/code_coverage 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 bash <(curl -s https://codecov.io/bash) -f nodist/obj_dir/coverage/app_total.info
;; ;;
*) *)

View File

@ -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_Fastcov = 0; # out of memory
our $opt_stages = ''; our $opt_stages = '';
our $Opt_Scenarios;
our %Opt_Stages; our %Opt_Stages;
autoflush STDOUT 1; autoflush STDOUT 1;
@ -38,10 +39,11 @@ Getopt::Long::config("no_auto_abbrev");
if (! GetOptions( if (! GetOptions(
"debug" => sub { $Debug = 1; }, "debug" => sub { $Debug = 1; },
"<>" => sub { die "%Error: Unknown parameter: $_[0]\n"; }, "<>" => sub { die "%Error: Unknown parameter: $_[0]\n"; },
"scenarios=s" => \$Opt_Scenarios, # driver.pl scenarios
"stages=s" => \$opt_stages, # starting stage number "stages=s" => \$opt_stages, # starting stage number
"stop!" => \$Opt_Stop, # stop/do not stop on error in tests "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"; print "Stage 3: make tests (with coverage on)\n";
run("make examples"); run("make examples");
run("make test_regress" run("make test_regress"
. ($Opt_Scenarios ? " SCENARIOS='".$Opt_Scenarios."'" : "")
. ($Opt_Stop ? '' : ' || true')); . ($Opt_Stop ? '' : ' || true'));
travis_fold_end(); travis_fold_end();
} }
@ -377,9 +380,17 @@ This will rebuild the current object files.
Displays this message and program version and exits. Displays this message and program version and exits.
=item -stage I<stage> =item --scenarios I<scenarios>
Runs a specific stage (see the script). Pass test scenarios onto driver.pl test harness.
=item --stages I<stage>
Runs a specific stage or range of stages (see the script).
=item --stop
Stop collecting data if tests fail.
=back =back