[test] Add simple ssat testcase for pose decoder
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>
Mon, 16 Oct 2023 08:18:22 +0000 (17:18 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 17 Oct 2023 02:38:23 +0000 (11:38 +0900)
- Add a simple test for option3 and option4 (increasing line coverage)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
tests/nnstreamer_decoder_pose/runTest.sh

index de9490e..34c323d 100755 (executable)
@@ -32,4 +32,27 @@ gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=4 ! videoc
 # TEST WITH MORE BUFFERS
 gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=20 ! videoconvert ! videoscale ! video/x-raw,width=14,height=14,format=RGB ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,add:128,div:255 ! tensor_split name=a tensorseg=1:14:14:1,2:14:14:1 a.src_0 ! tensor_transform mode=transpose option=1:2:0:3 ! tensor_decoder mode=pose_estimation option1=320:240 option2=14:14 ! fakesink" 2 0 0 $PERFORMANCE
 
+echo "nose 1 2 3 4
+leftEye 0 2 3
+rightEye 0 1 4
+leftEar 0 1
+rightEar 0 2
+leftShoulder 6 7 11
+rightShoulder 5 8 12
+leftElbow 5 9
+rightElbow 6 10
+leftWrist 7
+rightWrist 8
+leftHip 5 12 13
+rightHip 6 11 14
+leftKnee 11 15
+rightKnee 12 16
+leftAnkle 13
+rightAnkle 14" > pose_label.txt
+
+# TEST OPTION3 and OPTION4
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num_buffers=20 ! videoconvert ! videoscale ! video/x-raw,width=17,height=17,format=RGB ! tensor_converter ! tensor_transform mode=arithmetic option=typecast:float32,add:128,div:255 ! tensor_split name=a tensorseg=1:17:17:1,2:17:17:1 a.src_0 ! tensor_transform mode=transpose option=1:2:0:3 ! tensor_decoder mode=pose_estimation option1=320:240 option2=17:17 option3=pose_label.txt option4=heatmap-only option5=ignored ! fakesink" 3 0 0 $PERFORMANCE
+
+rm pose_label.txt
+
 report