summaryrefslogtreecommitdiff
path: root/scripts/command/tizen_xu4_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/command/tizen_xu4_test.sh')
-rwxr-xr-xscripts/command/tizen_xu4_test.sh26
1 files changed, 23 insertions, 3 deletions
diff --git a/scripts/command/tizen_xu4_test.sh b/scripts/command/tizen_xu4_test.sh
index bfebc352d..d56dae2b5 100755
--- a/scripts/command/tizen_xu4_test.sh
+++ b/scripts/command/tizen_xu4_test.sh
@@ -1,7 +1,7 @@
#!/bin/bash
SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-NNFW_ROOT=$SCRIPT_ROOT/../..
+HOST_HOME=$SCRIPT_ROOT/../..
if [ -z "$TEST_ROOT" ]; then
TEST_ROOT=/opt/usr/nnfw-test
fi
@@ -15,12 +15,16 @@ function Usage()
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
@@ -29,7 +33,7 @@ function prepare_rpm_test()
done
# download tflite model files
- pushd $NNFW_ROOT
+ pushd $HOST_HOME
tests/framework/run_test.sh --download=on
tar -zcf cache.tar.gz tests/framework/cache
$SDB_CMD push cache.tar.gz $TEST_ROOT/.
@@ -40,12 +44,16 @@ function prepare_rpm_test()
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
# download tflite model files
- pushd $NNFW_ROOT
+ pushd $HOST_HOME
tests/framework/run_test.sh --download=on
tar -zcf cache.tar.gz tests/framework/cache
$SDB_CMD push cache.tar.gz $TEST_ROOT/.
@@ -77,6 +85,9 @@ do
--framework)
FRAMEWORK=on
;;
+ --gcov-dir=*)
+ GCOV_DIR=${i#*=}
+ ;;
esac
shift
done
@@ -133,3 +144,12 @@ if [ "$VERIFICATION" == "on" ]; then
$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