travis timeout workaround
This commit is contained in:
22
.travis.yml
22
.travis.yml
@@ -25,17 +25,17 @@ script:
|
|||||||
- travis_wait 45 ci/test_driver.sh
|
- travis_wait 45 ci/test_driver.sh
|
||||||
- travis_wait 45 ci/test_riscv_isa.sh
|
- travis_wait 45 ci/test_riscv_isa.sh
|
||||||
- travis_wait 45 ci/test_opencl.sh
|
- travis_wait 45 ci/test_opencl.sh
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=rtlsim
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=rtlsim
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=1 --scope --app=demo --args="-n1"
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=1 --scope --app=demo --args="-n1"
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --debug
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --debug
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=1
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=1
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=2
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=2
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=4
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=4
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=2 --l2cache
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=2 --l2cache
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=4 --l2cache
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --driver=vlsim --cores=4 --l2cache
|
||||||
- travis_wait 45 ci/blackbox.sh --travis --driver=vlsim --cores=2 --l2cache --clusters=2
|
- travis_wait 45 ./ci/travis_run.py ./ci/blackbox.sh --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=vlsim --cores=2 --l2cache --clusters=4
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
# Gather code coverage
|
# Gather code coverage
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ set -e
|
|||||||
show_usage()
|
show_usage()
|
||||||
{
|
{
|
||||||
echo "Vortex BlackBox Test Driver v1.0"
|
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
|
DRIVER=vlsim
|
||||||
@@ -18,7 +18,6 @@ THREADS=4
|
|||||||
L2=0
|
L2=0
|
||||||
DEBUG=0
|
DEBUG=0
|
||||||
SCOPE=0
|
SCOPE=0
|
||||||
TRAVIS=0
|
|
||||||
HAS_ARGS=0
|
HAS_ARGS=0
|
||||||
|
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
@@ -65,17 +64,13 @@ case $i in
|
|||||||
HAS_ARGS=1
|
HAS_ARGS=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--travis)
|
|
||||||
TRAVIS=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--help)
|
--help)
|
||||||
show_usage
|
show_usage
|
||||||
exit
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
show_usage
|
show_usage
|
||||||
exit
|
exit -1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -91,7 +86,7 @@ case $DRIVER in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "invalid driver: $DRIVER"
|
echo "invalid driver: $DRIVER"
|
||||||
exit
|
exit -1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -113,7 +108,7 @@ case $APP in
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "invalid app: $APP"
|
echo "invalid app: $APP"
|
||||||
exit
|
exit -1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -124,13 +119,7 @@ echo "CONFIGS=$CONFIGS"
|
|||||||
make -C $DRIVER_PATH clean
|
make -C $DRIVER_PATH clean
|
||||||
|
|
||||||
if [ $DEBUG -eq 1 ]
|
if [ $DEBUG -eq 1 ]
|
||||||
then
|
then
|
||||||
if [ $TRAVIS -eq 1 ]
|
|
||||||
then
|
|
||||||
while sleep 5m; do echo "*** still running..."; done &
|
|
||||||
sleep_pid=$!
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $SCOPE -eq 1 ]
|
if [ $SCOPE -eq 1 ]
|
||||||
then
|
then
|
||||||
DEBUG=1 SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
|
DEBUG=1 SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
|
||||||
@@ -144,29 +133,13 @@ then
|
|||||||
else
|
else
|
||||||
make -C $APP_PATH run-$DRIVER > run.log 2>&1
|
make -C $APP_PATH run-$DRIVER > run.log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $TRAVIS -eq 1 ]
|
|
||||||
then
|
|
||||||
kill $sleep_pid
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
if [ $TRAVIS -eq 1 ]
|
|
||||||
then
|
|
||||||
while sleep 5m; do echo "*** still running..."; done &
|
|
||||||
sleep_pid=$!
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $SCOPE -eq 1 ]
|
if [ $SCOPE -eq 1 ]
|
||||||
then
|
then
|
||||||
SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
|
SCOPE=1 CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
|
||||||
else
|
else
|
||||||
CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
|
CONFIGS="$CONFIGS" make -C $DRIVER_PATH $DRIVER_EXTRA > build.log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $TRAVIS -eq 1 ]
|
|
||||||
then
|
|
||||||
kill $sleep_pid
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $HAS_ARGS -eq 1 ]
|
if [ $HAS_ARGS -eq 1 ]
|
||||||
then
|
then
|
||||||
|
|||||||
44
ci/travis_run.py
Executable file
44
ci/travis_run.py
Executable 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:])
|
||||||
Reference in New Issue
Block a user