travis timeout workaround

This commit is contained in:
Blaise Tine 2020-11-22 19:07:46 -08:00
parent 23cf72d7f4
commit e281d32138
3 changed files with 61 additions and 44 deletions

View file

@ -25,17 +25,17 @@ script:
- travis_wait 45 ci/test_driver.sh
- travis_wait 45 ci/test_riscv_isa.sh
- travis_wait 45 ci/test_opencl.sh
- travis_wait 45 ci/blackbox.sh --travis --driver=rtlsim
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=1 --scope --app=demo --args="-n1"
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --debug
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=1
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=2
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=4
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=2 --l2cache
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=4 --l2cache
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=2 --l2cache --clusters=2
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=2 --l2cache --clusters=4
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=rtlsim
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=1 --scope --app=demo --args="-n1"
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --debug
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=1
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=2
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=4
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=2 --l2cache
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=4 --l2cache
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=2 --l2cache --clusters=2
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=2 --l2cache --clusters=4
after_success:
# Gather code coverage

View file

@ -6,7 +6,7 @@ set -e
show_usage()
{
echo "Vortex BlackBox Test Driver v1.0"
echo "Usage: [[--clusters=#n] [--cores=#n] [--warps=#n] [--threads=#n] [--l2cache] [[--driver=rtlsim|vlsim] [--debug] [--scope] [--travis] [--app=vecadd|sgemm|basic|demo|dogfood] [--args=<args>] [--help]]"
echo "Usage: [[--clusters=#n] [--cores=#n] [--warps=#n] [--threads=#n] [--l2cache] [[--driver=rtlsim|vlsim] [--debug] [--scope] [--app=vecadd|sgemm|basic|demo|dogfood] [--args=<args>] [--help]]"
}
DRIVER=vlsim
@ -18,7 +18,6 @@ THREADS=4
L2=0
DEBUG=0
SCOPE=0
TRAVIS=0
HAS_ARGS=0
for i in "$@"
@ -65,17 +64,13 @@ case $i in
HAS_ARGS=1
shift
;;
--travis)
TRAVIS=1
shift
;;
--help)
show_usage
exit
exit 0
;;
*)
show_usage
exit
exit -1
;;
esac
done
@ -91,7 +86,7 @@ case $DRIVER in
;;
*)
echo "invalid driver: $DRIVER"
exit
exit -1
;;
esac
@ -113,7 +108,7 @@ case $APP in
;;
*)
echo "invalid app: $APP"
exit
exit -1
;;
esac
@ -124,13 +119,7 @@ echo "CONFIGS=$CONFIGS"
make -C $DRIVER_PATH clean
if [ $DEBUG -eq 1 ]
then
if [ $TRAVIS -eq 1 ]
then
while sleep 5m; do echo "*** still running..."; done &
sleep_pid=$!
fi
then
if [ $SCOPE -eq 1 ]
then
DEBUG=1 SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
@ -144,29 +133,13 @@ then
else
make -C $APP_PATH run-$DRIVER > run.log 2>&1
fi
if [ $TRAVIS -eq 1 ]
then
kill $sleep_pid
fi
else
if [ $TRAVIS -eq 1 ]
then
while sleep 5m; do echo "*** still running..."; done &
sleep_pid=$!
fi
if [ $SCOPE -eq 1 ]
then
SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
else
CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
fi
if [ $TRAVIS -eq 1 ]
then
kill $sleep_pid
fi
if [ $HAS_ARGS -eq 1 ]
then

44
ci/travis_run.py Executable file
View file

@ -0,0 +1,44 @@
#!/usr/bin/env python
import sys
import time
import threading
import subprocess
PingInterval = 15
def PingCallback(stop):
wait_time = 0
while True:
time.sleep(PingInterval)
wait_time += PingInterval
print(" + still running (" + str(wait_time) + "s) ...")
sys.stdout.flush()
if stop():
break
def run_command(command):
process = subprocess.Popen(command, stdout=subprocess.PIPE)
while True:
output = process.stdout.readline()
if output == '' and process.poll() is not None:
break
if output:
print output.strip()
return process.returncode
def main(argv):
stop_threads = False
t = threading.Thread(target = PingCallback, args =(lambda : stop_threads, ))
t.start()
exitcode = run_command(argv)
print(" + exitcode="+str(exitcode))
stop_threads = True
t.join()
sys.exit(exitcode)
if __name__ == "__main__":
main(sys.argv[1:])