echo "--unittest : run unittest"
echo "--verification : run verification"
echo "--framework : run framework"
+ echo "--gcov-dir : directory to save gcov files"
}
function prepare_rpm_test()
{
echo "======= Test with rpm packages(gbs build) ======="
+ # clean up
+ $SDB_CMD shell rm -rf $TEST_ROOT
+ $SDB_CMD shell mkdir -p $TEST_ROOT
# install nnfw nnfw-test rpms
for file in $RPM_DIR/*
do
function prepare_suite_test()
{
echo "======= Test with test-suite(cross build) ======="
+ # clean up
+ $SDB_CMD shell rm -rf $TEST_ROOT
+ $SDB_CMD shell mkdir -p $TEST_ROOT
+
# install test-suite
$SDB_CMD push $TEST_SUITE_PATH $TEST_ROOT/$(basename $TEST_SUITE_PATH)
$SDB_CMD shell tar -zxf $TEST_ROOT/$(basename $TEST_SUITE_PATH) -C $TEST_ROOT
--framework)
FRAMEWORK=on
;;
+ --gcov-dir=*)
+ GCOV_DIR=${i#*=}
+ ;;
esac
shift
done
$SDB_CMD shell $TEST_ROOT/tools/test_driver/test_driver.sh --verification --artifactpath=$TEST_ROOT
fi
+# pull gcov files
+if [ -n "$GCOV_DIR" ]; then
+ $SDB_CMD shell 'rm -rf /home/gcov && mkdir -p /home/gcov'
+ $SDB_CMD shell 'find / -type f \( -iname "*.gcda" -or -iname "*.gcno" \) -exec cp {} /home/gcov/. \;'
+ $SDB_CMD shell 'cd /home/ && tar -zcvf gcov.tar.gz ./gcov '
+ cd $GCOV_DIR
+ sdb pull /home/gcov.tar.gz
+ tar -zxvf gcov.tar.gz
+fi