From 6b1781cb5ef5d6586dbe5c06bd973a0957c91813 Mon Sep 17 00:00:00 2001 From: Kevin-Luong <39298548+Kevin-Luong@users.noreply.github.com> Date: Thu, 18 Jun 2020 16:32:09 +0700 Subject: Update gtest_dlt_all.sh to detect core dump Signed-off-by: Luong Hong Duy Khanh --- .travis/gtest_dlt_all.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to '.travis') diff --git a/.travis/gtest_dlt_all.sh b/.travis/gtest_dlt_all.sh index 1eeb231..50bb73e 100755 --- a/.travis/gtest_dlt_all.sh +++ b/.travis/gtest_dlt_all.sh @@ -28,14 +28,21 @@ function gtest_run_test() { LOG="../.travis/$1.log" + # Send all messsages and system errors to log file + export LIBC_FATAL_STDERR_=1 + # Execute unit test - ./$1 > $LOG + { ./$1 ;} > $LOG 2>&1 + + # Release + export LIBC_FATAL_STDERR_=0 # Check for result - grep "FAILED TEST" $LOG + grep "FAILED TEST\|core dumped" $LOG if [ $? -eq 0 ] then cat $LOG + echo "$1 failed" exit 1 fi echo "$1 passed" -- cgit v1.2.1