From 88506bccae393ec06ad7efb391e58214dbb03a56 Mon Sep 17 00:00:00 2001 From: curbengh <43627182+curbengh@users.noreply.github.com> Date: Thu, 19 Dec 2019 23:42:03 +0000 Subject: [PATCH] test(benchmark): skip checking completion time in hot processing --- test/benchmark.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/benchmark.sh b/test/benchmark.sh index 8d0d26121f..39ab37e314 100755 --- a/test/benchmark.sh +++ b/test/benchmark.sh @@ -27,14 +27,16 @@ LOG_TABLE () { total_time=$(_SUBSTRUCTION $time_database_saved $time_begin | xargs -0 printf "%.0f") line_number=$(wc -l build.log | cut -d" " -f1) - if [ $total_time -lt 10 ] || ([ $line_number -lt 300 ] && [ $1 != "HOT" ]); then - echo "--------------------------------------------" - echo -e '\033[41;37m !! Build failed !! \033[0m' - head -n 400 build.log - exit 1 + if [ "$1" != "HOT" ]; then + if [ "$total_time" -lt 10 ] || [ "$line_number" -lt 300 ]; then + echo "--------------------------------------------" + echo -e '\033[41;37m !! Build failed !! \033[0m' + head -n 400 build.log + exit 1 + fi fi - if [ $total_time -gt 40 ]; then + if [ "$total_time" -gt 40 ]; then echo "--------------------------------------------" echo -e '\033[41;37m !! Performance regression detected !! \033[0m' exit 1