mirror of
https://github.com/containers/youki
synced 2024-09-28 15:01:29 +02:00
Merge pull request #223 from chenyukang/fix-test-script
Show error log only when error happens
This commit is contained in:
commit
3572f7ed46
@ -90,7 +90,11 @@ for case in "${test_cases[@]}"; do
|
||||
fi
|
||||
|
||||
echo "Running $case"
|
||||
if [ 0 -ne $(sudo RUST_BACKTRACE=1 YOUKI_LOG_LEVEL=debug RUNTIME=${RUNTIME} ${ROOT}/integration_test/src/github.com/opencontainers/runtime-tools/validation/$case | grep "not ok" | wc -l) ]; then
|
||||
logfile="./log/$case.log"
|
||||
mkdir -p "$(dirname $logfile)"
|
||||
sudo RUST_BACKTRACE=1 RUNTIME=${RUNTIME} ${ROOT}/integration_test/src/github.com/opencontainers/runtime-tools/validation/$case >$logfile 2>&1
|
||||
if [ 0 -ne $(grep "not ok" $logfile | wc -l ) ]; then
|
||||
cat $logfile
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
|
Loading…
Reference in New Issue
Block a user