diff options
author | Fedja Beader <fedja@protonmail.ch> | 2023-09-10 15:58:24 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2023-09-10 15:58:24 +0200 |
commit | 0a2d34be04d72b8982cc2cd488f7e6432d30b40b (patch) | |
tree | 8eca42bd37a93b9eae2200133dfd7ad47024ad09 /tools/ci/scripts/runtest.sh | |
parent | 3f68449293de30d84e39fef761ca5a4734f99c32 (diff) | |
download | manaverse-0a2d34be04d72b8982cc2cd488f7e6432d30b40b.tar.gz manaverse-0a2d34be04d72b8982cc2cd488f7e6432d30b40b.tar.bz2 manaverse-0a2d34be04d72b8982cc2cd488f7e6432d30b40b.tar.xz manaverse-0a2d34be04d72b8982cc2cd488f7e6432d30b40b.zip |
trim useless uses of cat
Diffstat (limited to 'tools/ci/scripts/runtest.sh')
-rwxr-xr-x | tools/ci/scripts/runtest.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/ci/scripts/runtest.sh b/tools/ci/scripts/runtest.sh index 7707a34aa..4b0320fed 100755 --- a/tools/ci/scripts/runtest.sh +++ b/tools/ci/scripts/runtest.sh @@ -74,18 +74,15 @@ function kill_app { } function final_log { - export DATA=$(cat logs/run.log) - if [[ -z "${DATA}" ]]; then + if [[ ! -s logs/run.log ]]; then echo "Error: no output" exit 1 fi cat logs/run.log - export DATA=$(grep "[.]cpp" logs/run.log) - if [[ -n "${DATA}" ]]; then - echo "Error: possible leak detected" - echo "${DATA}" + if grep "[.]cpp" logs/run.log; then + echo "Error: possible leak detected, see above" exit 1 fi } |