[DIST] Skip testcase generation in Tizen GBS/OBS.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 29 May 2018 01:19:49 +0000 (10:19 +0900)
committer함명주/동작제어Lab(SR)/Principal Engineer/삼성전자 <myungjoo.ham@samsung.com>
Tue, 29 May 2018 02:36:37 +0000 (11:36 +0900)
Testcase Generation of Tensor_Converter requires PIL and TK, which are removed from Tizen and I do not want to add them just for unit testing.

Note that in order to pass unit tests, we need #14 merged.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
packaging/nnstreamer.spec
packaging/testcase_tensor_converter.tar.gz [new file with mode: 0644]
tensor_converter/test/runTest.sh
tensor_converter/test/testcase01.sh
tensor_converter/test/testcase02.sh

index 2633bcd..9ca03cc 100644 (file)
@@ -7,6 +7,7 @@ Packager:       MyungJoo Ham <myungjoo.ham@samsung.com>
 License:       LGPL-2.0
 Source0:       nnstreamer-%{version}.tar.gz
 Source1001:    nnstreamer.manifest
+Source2001:    testcase_tensor_converter.tar.gz
 
 Requires:      gstreamer >= 1.8.0
 Requires:      libdlog
@@ -34,7 +35,10 @@ popd
 # DO THE TEST!
 
 pushd tensor_converter/test
-./runTest.sh
+# We skip testcase gen because it requires PIL, which requires tk.
+# Use the pre-generated test cases
+tar -xf %{SOURCE2001}
+./runTest.sh -skipgen
 popd
 
 %install
diff --git a/packaging/testcase_tensor_converter.tar.gz b/packaging/testcase_tensor_converter.tar.gz
new file mode 100644 (file)
index 0000000..29f712e
Binary files /dev/null and b/packaging/testcase_tensor_converter.tar.gz differ
index 6521488..ded85fa 100755 (executable)
@@ -1,10 +1,18 @@
 #!/usr/bin/env bash
 
 failed=0
+sopath=""
 
-python generateGoldenTestResult.py
-./testcase01.sh $1 || failed=1
-./testcase02.sh $1 || failed=1
+if [ "$1" == "-skipgen" ]
+then
+  echo "Test Case Generation Skipped"
+  sopath=$2
+else
+  python generateGoldenTestResult.py
+  sopath=$1
+fi
+./testcase01.sh $sopath || failed=1
+./testcase02.sh $sopath || failed=1
 
 
 echo ""
index 8167745..0c507bc 100755 (executable)
@@ -11,7 +11,7 @@
 
 if [ $# -eq 0 ]
 then
-  PATH_TO_PLUGIN="$PWD/../../build"
+  PATH_TO_PLUGIN="$PWD/../../build/tensor_converter"
 else
   PATH_TO_PLUGIN="$1"
 fi
index 07b77ed..64e9fd6 100755 (executable)
@@ -11,7 +11,7 @@
 
 if [ $# -eq 0 ]
 then
-  PATH_TO_PLUGIN="$PWD/../../build"
+  PATH_TO_PLUGIN="$PWD/../../build/tensor_converter"
 else
   PATH_TO_PLUGIN="$1"
 fi