cunit: add ptest

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Sakib Sajal
2020-07-09 15:43:15 -04:00
committed by Khem Raj
parent 9019ceb2cc
commit 27ec5216af
2 changed files with 35 additions and 2 deletions
@@ -0,0 +1,19 @@
#!/bin/sh
ptestdir=$(dirname "$(readlink -f "$0")")
cd $ptestdir/tests
./test_cunit > cunit_test_out.tmp
echo "--- Test output ---"
cat cunit_test_out.tmp
echo ""
echo "--- ptest result ---"
grep "Failures: 0" cunit_test_out.tmp > /dev/null
if [ $? -eq 0 ]; then
echo "PASS: cunit"
else
echo "FAIL: cunit"
fi
rm -f cunit_test_out.tmp