[GHA] Add tests.

This commit is contained in:
s3rj1k
2024-10-11 20:16:39 +02:00
parent b4ebd0936c
commit 07283ac104
7 changed files with 269 additions and 21 deletions
+10 -2
View File
@@ -1,11 +1,16 @@
#!/bin/bash
start_time=$(date +%s)
# All output will be collected here
TESTSUNITPATH=$PWD
# All relative paths are based on the tree's root
FSBASEDIR=$(realpath "$PWD/../../")
ulimit -c unlimited
ulimit -a
i=$1
echo "----------------------------------" ;
@@ -28,20 +33,23 @@ echo "Start executing $currenttestpath"
$currenttestpath 2>&1 | tee >(ansi2html > $log) ;
exitstatus=${PIPESTATUS[0]} ;
echo "End executing $currenttestpath"
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "Test $1 took $duration seconds" >> test_times.log
echo "Exit status is $exitstatus"
if [ "0" -eq $exitstatus ] ; then
rm $log ;
else
echo "*** ./$i exit status is $exitstatus" ;
corefilesearch=/cores/core.*.!drone!src!${relativedir//\//!}!.libs!$file.* ;
corefilesearch=/cores/core.*.!__w!freeswitch!freeswitch!${relativedir//\//!}!.libs!$file.* ;
echo $corefilesearch ;
if ls $corefilesearch 1> /dev/null 2>&1; then
echo "coredump found";
coredump=$(ls $corefilesearch) ;
echo $coredump;
echo "set logging file $TESTSUNITPATH/backtrace_${i//\//!}.txt" ;
gdb -ex "set logging file $TESTSUNITPATH/backtrace_${i//\//!}.txt" -ex "set logging on" -ex "set pagination off" -ex "bt full" -ex "bt" -ex "info threads" -ex "thread apply all bt" -ex "thread apply all bt full" -ex "quit" /drone/src/$relativedir/.libs/$file $coredump ;
gdb -ex "set logging file $TESTSUNITPATH/backtrace_${i//\//!}.txt" -ex "set logging on" -ex "set pagination off" -ex "bt full" -ex "bt" -ex "info threads" -ex "thread apply all bt" -ex "thread apply all bt full" -ex "quit" /__w/freeswitch/freeswitch/$relativedir/.libs/$file $coredump ;
fi ;
echo "*** $log was saved" ;
fi ;