mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
[GHA] Add tests.
This commit is contained in:
@@ -3,26 +3,27 @@
|
||||
# "print_tests" returns relative paths to all the tests
|
||||
TESTS=$(make -s -C ../.. print_tests)
|
||||
|
||||
chunks=${1:-1}
|
||||
chunk_number=${2:-1}
|
||||
|
||||
IFS=$'\n' read -d '' -r -a lines <<< "$TESTS"
|
||||
|
||||
result=""
|
||||
for ((i=chunk_number-1; i<${#lines[@]}; i+=chunks))
|
||||
do
|
||||
result+="${lines[$i]}"$'\n'
|
||||
done
|
||||
|
||||
TESTS=$result
|
||||
|
||||
echo "-----------------------------------------------------------------";
|
||||
echo "Starting tests";
|
||||
echo "Starting tests on $(nproc --all) processors";
|
||||
echo "Tests found: ${TESTS}";
|
||||
echo "-----------------------------------------------------------------";
|
||||
echo "Starting" > pids.txt
|
||||
for i in $TESTS
|
||||
do
|
||||
echo "Testing $i" ;
|
||||
./test.sh "$i" &
|
||||
pid=($!)
|
||||
pids+=($pid)
|
||||
echo "$pid $i" >> pids.txt
|
||||
echo "----------------" ;
|
||||
done
|
||||
|
||||
for pid in "${pids[@]}"
|
||||
do
|
||||
echo "$pid waiting" >> pids.txt
|
||||
wait "$pid"
|
||||
echo "$pid finished" >> pids.txt
|
||||
done
|
||||
make -f run-tests.mk TEST_LIST=$TESTS
|
||||
|
||||
echo "Done running tests!"
|
||||
echo "Timing results:"
|
||||
cat test_times.log
|
||||
|
||||
echo "Done running tests!"
|
||||
|
Reference in New Issue
Block a user