freeswitch/tests/unit/run-tests.sh

30 lines
648 B
Bash
Raw Normal View History

2019-11-21 18:43:28 +00:00
#!/bin/bash
# "print_tests" returns relative paths to all the tests
TESTS=$(make -s -C ../.. print_tests)
2024-07-25 17:47:30 +00:00
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
2019-11-21 18:43:28 +00:00
echo "-----------------------------------------------------------------";
2024-07-25 17:47:30 +00:00
echo "Starting tests on $(nproc --all) processors";
2019-11-21 18:43:28 +00:00
echo "Tests found: ${TESTS}";
echo "-----------------------------------------------------------------";
2020-01-22 16:36:53 +00:00
2024-07-25 17:47:30 +00:00
make -f run-tests.mk TEST_LIST=$TESTS
echo "Timing results:"
cat test_times.log
2020-01-22 16:36:53 +00:00
2024-07-25 17:47:30 +00:00
echo "Done running tests!"