mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
71 lines
1.2 KiB
Bash
Executable file
71 lines
1.2 KiB
Bash
Executable file
|
|
# Tup with CONFIG_LUPPP_BUILD_TESTS=y
|
|
|
|
# Compile with:
|
|
# define BUILD_TESTS
|
|
# define BUILD_COVERAGE_TEST
|
|
# -lgcov
|
|
|
|
# run the tests:
|
|
# Luppp quits after tests are finished
|
|
# gcov scrapes .gcna / .gcdo files, produces .gcov files
|
|
# cp source files into dir: needed for analysis by lcov
|
|
# lcov scrapes .gcov files into lcov.info
|
|
# genhtml produces index.html from lcov.info
|
|
|
|
#set -e
|
|
|
|
make && ./bin/luppp -test -stopAfterTest
|
|
if [ $? -eq 0 ]; then
|
|
notify-send -t 5 "Luppp: Tests passed..."
|
|
else
|
|
notify-send -t 10 -u critical "Luppp: Build / Test Failed!"
|
|
fi
|
|
|
|
|
|
|
|
exit
|
|
#####################################
|
|
|
|
FILE=buildTest/build.success
|
|
|
|
rm -f $(FILE)
|
|
|
|
tup upd buildTest/ ;
|
|
|
|
|
|
if [ ! -f $FILE ]; then
|
|
echo "File not found!"
|
|
fi
|
|
|
|
if [ -f $FILE ];
|
|
then
|
|
echo "File $FILE exists."
|
|
else
|
|
notify-send -t 0 --urgency=critical "Luppp: Compilation FAILURE!"
|
|
exit
|
|
fi
|
|
|
|
sleep 1
|
|
|
|
cd buildTest/
|
|
|
|
./luppp
|
|
|
|
if [ $? -eq 0 ]; then
|
|
notify-send -t 5 "Luppp: Tests passed successfully..."
|
|
echo OK
|
|
else
|
|
notify-send -t 5 -u critical "Luppp: Test FAILURE!"
|
|
echo FAIL
|
|
fi
|
|
|
|
cd src
|
|
|
|
gcov -r -b *
|
|
cp -r ../../src/* ./
|
|
lcov --directory . --capture --output-file lcov.info
|
|
genhtml lcov.info
|
|
|
|
notify-send -t 5 "Luppp: Test data available..."
|
|
#firefox src/index.html
|