1. Add postfix in tc name for the negative testcases.
2. Update comment for future work.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
/**
* @brief Test for int32 type string.
*/
+TEST (common_get_tensor_type, failure_n)
+{
+ EXPECT_EQ (gst_tensor_get_type (""), _NNS_END);
+ EXPECT_EQ (gst_tensor_get_type (NULL), _NNS_END);
+}
+
+/**
+ * @brief Test for int32 type string.
+ */
TEST (common_get_tensor_type, int32)
{
EXPECT_EQ (gst_tensor_get_type ("int32"), _NNS_INT32);
EXPECT_EQ (gst_tensor_get_type ("INT32"), _NNS_INT32);
EXPECT_EQ (gst_tensor_get_type ("iNt32"), _NNS_INT32);
EXPECT_EQ (gst_tensor_get_type ("InT32"), _NNS_INT32);
+}
+
+/**
+ * @brief Test for int32 type string.
+ */
+TEST (common_get_tensor_type, int32_n)
+{
EXPECT_EQ (gst_tensor_get_type ("InT322"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("int3"), _NNS_END);
- EXPECT_EQ (gst_tensor_get_type (""), _NNS_END);
}
/**
EXPECT_EQ (gst_tensor_get_type ("INT16"), _NNS_INT16);
EXPECT_EQ (gst_tensor_get_type ("iNt16"), _NNS_INT16);
EXPECT_EQ (gst_tensor_get_type ("InT16"), _NNS_INT16);
+}
+
+/**
+ * @brief Test for int16 type string.
+ */
+TEST (common_get_tensor_type, int16_n)
+{
EXPECT_EQ (gst_tensor_get_type ("InT162"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("int1"), _NNS_END);
}
EXPECT_EQ (gst_tensor_get_type ("INT8"), _NNS_INT8);
EXPECT_EQ (gst_tensor_get_type ("iNt8"), _NNS_INT8);
EXPECT_EQ (gst_tensor_get_type ("InT8"), _NNS_INT8);
+}
+
+/**
+ * @brief Test for int8 type string.
+ */
+TEST (common_get_tensor_type, int8_n)
+{
EXPECT_EQ (gst_tensor_get_type ("InT82"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("int3"), _NNS_END);
}
EXPECT_EQ (gst_tensor_get_type ("UINT32"), _NNS_UINT32);
EXPECT_EQ (gst_tensor_get_type ("uiNt32"), _NNS_UINT32);
EXPECT_EQ (gst_tensor_get_type ("UInT32"), _NNS_UINT32);
+}
+
+/**
+ * @brief Test for uint32 type string.
+ */
+TEST (common_get_tensor_type, uint32_n)
+{
EXPECT_EQ (gst_tensor_get_type ("UInT322"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("uint3"), _NNS_END);
}
EXPECT_EQ (gst_tensor_get_type ("UINT16"), _NNS_UINT16);
EXPECT_EQ (gst_tensor_get_type ("uiNt16"), _NNS_UINT16);
EXPECT_EQ (gst_tensor_get_type ("UInT16"), _NNS_UINT16);
+}
+
+/**
+ * @brief Test for uint16 type string.
+ */
+TEST (common_get_tensor_type, uint16_n)
+{
EXPECT_EQ (gst_tensor_get_type ("UInT162"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("uint1"), _NNS_END);
}
EXPECT_EQ (gst_tensor_get_type ("UINT8"), _NNS_UINT8);
EXPECT_EQ (gst_tensor_get_type ("uiNt8"), _NNS_UINT8);
EXPECT_EQ (gst_tensor_get_type ("UInT8"), _NNS_UINT8);
+}
+
+/**
+ * @brief Test for uint8 type string.
+ */
+TEST (common_get_tensor_type, uint8_n)
+{
EXPECT_EQ (gst_tensor_get_type ("UInT82"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("uint3"), _NNS_END);
}
EXPECT_EQ (gst_tensor_get_type ("FLOAT32"), _NNS_FLOAT32);
EXPECT_EQ (gst_tensor_get_type ("float32"), _NNS_FLOAT32);
EXPECT_EQ (gst_tensor_get_type ("FloaT32"), _NNS_FLOAT32);
+}
+
+/**
+ * @brief Test for float32 type string.
+ */
+TEST (common_get_tensor_type, float32_n)
+{
EXPECT_EQ (gst_tensor_get_type ("FloaT322"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("float3"), _NNS_END);
}
EXPECT_EQ (gst_tensor_get_type ("FLOAT64"), _NNS_FLOAT64);
EXPECT_EQ (gst_tensor_get_type ("float64"), _NNS_FLOAT64);
EXPECT_EQ (gst_tensor_get_type ("FloaT64"), _NNS_FLOAT64);
+}
+
+/**
+ * @brief Test for float64 type string.
+ */
+TEST (common_get_tensor_type, float64_n)
+{
EXPECT_EQ (gst_tensor_get_type ("FloaT642"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("float6"), _NNS_END);
}
EXPECT_EQ (gst_tensor_get_type ("INT64"), _NNS_INT64);
EXPECT_EQ (gst_tensor_get_type ("iNt64"), _NNS_INT64);
EXPECT_EQ (gst_tensor_get_type ("InT64"), _NNS_INT64);
+}
+
+/**
+ * @brief Test for int64 type string.
+ */
+TEST (common_get_tensor_type, int64_n)
+{
EXPECT_EQ (gst_tensor_get_type ("InT642"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("int6"), _NNS_END);
}
EXPECT_EQ (gst_tensor_get_type ("UINT64"), _NNS_UINT64);
EXPECT_EQ (gst_tensor_get_type ("uiNt64"), _NNS_UINT64);
EXPECT_EQ (gst_tensor_get_type ("UInT64"), _NNS_UINT64);
+}
+
+/**
+ * @brief Test for uint64 type string.
+ */
+TEST (common_get_tensor_type, uint64_n)
+{
EXPECT_EQ (gst_tensor_get_type ("UInT642"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("uint6"), _NNS_END);
}
EXPECT_EQ (find_key_strv (teststrv, "abcde"), 0);
EXPECT_EQ (find_key_strv (teststrv, "ABCDE"), 0);
+ EXPECT_EQ (find_key_strv (teststrv, "ABCDEF"), 1);
EXPECT_EQ (find_key_strv (teststrv, "1234"), 2);
EXPECT_EQ (find_key_strv (teststrv, "tester"), 4);
EXPECT_EQ (find_key_strv (teststrv, "abcabcd"), -1);
EXPECT_EQ (g_mkdir (dircf, 0755), 0);
EXPECT_EQ (g_mkdir (dird, 0755), 0);
-
FILE *fp = g_fopen (filename, "w");
const gchar *fn;
const gchar *base_confenv;
# @TODO Change this when YUV becomes supported by tensor_converter
# Fail Test: YUV is given
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num-buffers=1 ! video/x-raw,format=YUV,width=280,height=40,framerate=0/1 ! videoconvert ! video/x-raw, format=YUV ! tensor_converter silent=TRUE ! filesink location=\"test.yuv.fail.log\" sync=true" 5-F 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num-buffers=1 ! video/x-raw,format=YUV,width=280,height=40,framerate=0/1 ! videoconvert ! video/x-raw, format=YUV ! tensor_converter silent=TRUE ! filesink location=\"test.yuv.fail.log\" sync=true" 5F_n 0 1 $PERFORMANCE
# Fail Test: Unknown property is given
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num-buffers=1 ! video/x-raw,format=RGB,width=280,height=40,framerate=0/1 ! videoconvert ! video/x-raw, format=RGB ! tensor_converter silent=TRUE whatthehell=isthis ! filesink location=\"test.yuv.fail.log\" sync=true" 6-F 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num-buffers=1 ! video/x-raw,format=RGB,width=280,height=40,framerate=0/1 ! videoconvert ! video/x-raw, format=RGB ! tensor_converter silent=TRUE whatthehell=isthis ! filesink location=\"test.yuv.fail.log\" sync=true" 6F_n 0 1 $PERFORMANCE
# audio format S16LE, 8k sample rate, samples per buffer 8000
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} audiotestsrc num-buffers=1 samplesperbuffer=8000 ! audioconvert ! audio/x-raw,format=S16LE,rate=8000 ! tee name=t ! queue ! audioconvert ! tensor_converter frames-per-tensor=8000 ! filesink location=\"test.audio8k.s16le.log\" sync=true t. ! queue ! filesink location=\"test.audio8k.s16le.origin.log\" sync=true" 7-1
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} audiotestsrc num-buffers=1 samplesperbuffer=8000 ! audioconvert ! audio/x-raw,format=S16LE,rate=8000 ! tee name=t ! queue ! audioconvert ! tensor_converter frames-per-tensor=8000 ! filesink location=\"test.audio8k.s16le.log\" sync=true t. ! queue ! filesink location=\"test.audio8k.s16le.origin.log\" sync=true" 7-1 0 0 $PERFORMANCE
callCompareTest test.audio8k.s16le.origin.log test.audio8k.s16le.log 7-2 "Audio8k-s16le Golden Test" 0 0
# audio format U8, 16k sample rate, samples per buffer 8000
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} audiotestsrc num-buffers=1 samplesperbuffer=8000 ! audioconvert ! audio/x-raw,format=U8,rate=16000 ! tee name=t ! queue ! audioconvert ! tensor_converter frames-per-tensor=8000 ! filesink location=\"test.audio16k.u8.log\" sync=true t. ! queue ! filesink location=\"test.audio16k.u8.origin.log\" sync=true" 7-3
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} audiotestsrc num-buffers=1 samplesperbuffer=8000 ! audioconvert ! audio/x-raw,format=U8,rate=16000 ! tee name=t ! queue ! audioconvert ! tensor_converter frames-per-tensor=8000 ! filesink location=\"test.audio16k.u8.log\" sync=true t. ! queue ! filesink location=\"test.audio16k.u8.origin.log\" sync=true" 7-3 0 0 $PERFORMANCE
callCompareTest test.audio16k.u8.origin.log test.audio16k.u8.log 7-4 "Audio16k-u8 Golden Test" 0 0
# audio format U16LE, 16k sample rate, 2 channels, samples per buffer 8000
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} audiotestsrc num-buffers=1 samplesperbuffer=8000 ! audioconvert ! audio/x-raw,format=U16LE,rate=16000,channels=2 ! tee name=t ! queue ! audioconvert ! tensor_converter frames-per-tensor=8000 ! filesink location=\"test.audio16k2c.u16le.log\" sync=true t. ! queue ! filesink location=\"test.audio16k2c.u16le.origin.log\" sync=true" 7-5
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} audiotestsrc num-buffers=1 samplesperbuffer=8000 ! audioconvert ! audio/x-raw,format=U16LE,rate=16000,channels=2 ! tee name=t ! queue ! audioconvert ! tensor_converter frames-per-tensor=8000 ! filesink location=\"test.audio16k2c.u16le.log\" sync=true t. ! queue ! filesink location=\"test.audio16k2c.u16le.origin.log\" sync=true" 7-5 0 0 $PERFORMANCE
callCompareTest test.audio16k2c.u16le.origin.log test.audio16k2c.u16le.log 7-6 "Audio16k2c-u16le Golden Test" 0 0
# audio format S32LE, 8k sample rate, samples per buffer 8000
callCompareTest testcase3.con.log testcase3.dec.log 3 "Compare for case 3" 0 0
## Trigger "decoder not configured"
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc ! tensor_converter ! tensor_decoder mode=direct_video ! video/mpeg ! fakesink" 4 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc ! tensor_converter ! tensor_decoder mode=direct_video ! video/mpeg ! fakesink" 4F_n 0 1 $PERFORMANCE
report
python checkScaledTensor.py testcase06.direct.log 640 480 testcase06.scaled.log 320 240 3
testResult $? 6 "Golden test comparison" 0 1
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num-buffers=1 ! video/x-raw,format=RGB,width=640,height=480,framerate=0/1 ! videoconvert ! video/x-raw, format=RGB ! tensor_converter ! tee name=t ! queue ! tensor_filter framework=\"custom\" model=\"${PATH_TO_MODEL_S}\" custom=\"1280X960\" ! filesink location=\"testcase07.scaled.log\" sync=true t. ! queue ! filesink location=\"testcase07.direct.log\" sync=true" 6 0 0 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc num-buffers=1 ! video/x-raw,format=RGB,width=640,height=480,framerate=0/1 ! videoconvert ! video/x-raw, format=RGB ! tensor_converter ! tee name=t ! queue ! tensor_filter framework=\"custom\" model=\"${PATH_TO_MODEL_S}\" custom=\"1280X960\" ! filesink location=\"testcase07.scaled.log\" sync=true t. ! queue ! filesink location=\"testcase07.direct.log\" sync=true" 7 0 0 $PERFORMANCE
python checkScaledTensor.py testcase07.direct.log 640 480 testcase07.scaled.log 1280 960 3
testResult $? 7 "Golden test comparison" 0 1
testResult $? 1 "Golden test comparison" 0 1
# Fail test for invalid input properties
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=GRAY8,framerate=0/1 ! tensor_converter ! tensor_filter framework=pytorch model=${PATH_TO_MODEL} input=7:1 inputtype=float32 ! filesink location=tensorfilter.out.log" 2-F 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=GRAY8,framerate=0/1 ! tensor_converter ! tensor_filter framework=pytorch model=${PATH_TO_MODEL} input=7:1 inputtype=float32 ! filesink location=tensorfilter.out.log" 2F_n 0 1 $PERFORMANCE
# Fail test for invalid output properties
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=GRAY8,framerate=0/1 ! tensor_converter ! tensor_filter framework=pytorch model=${PATH_TO_MODEL} output=1:7 outputtype=int8 ! filesink location=tensorfilter.out.log" 3-F 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=GRAY8,framerate=0/1 ! tensor_converter ! tensor_filter framework=pytorch model=${PATH_TO_MODEL} output=1:7 outputtype=int8 ! filesink location=tensorfilter.out.log" 3F_n 0 1 $PERFORMANCE
report
testResult $? 1 "Golden test comparison" 0 1
# Fail test for invalid input properties
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow-lite model=${PATH_TO_MODEL} input=7:1 inputtype=float32 ! filesink location=tensorfilter.out.log" 2-F 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow-lite model=${PATH_TO_MODEL} input=7:1 inputtype=float32 ! filesink location=tensorfilter.out.log" 2F_n 0 1 $PERFORMANCE
# Fail test for invalid output properties
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow-lite model=${PATH_TO_MODEL} output=1:7 outputtype=int8 ! filesink location=tensorfilter.out.log" 3-F 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter ! tensor_filter framework=tensorflow-lite model=${PATH_TO_MODEL} output=1:7 outputtype=int8 ! filesink location=tensorfilter.out.log" 3F_n 0 1 $PERFORMANCE
report
convertBMP2PNG
# Fail Test : Negotiation Error (dimension)
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=testsequence_%1d.png index=0 caps=\"image/png,framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! queue ! tensor_reposink silent=false slot-index=0 tensor_reposrc silent=false slot-index=0 caps=\"other/tensor,dimension=(string)3:100:100:1,type=(string)uint8,framerate=(fraction)30/1\" ! multifilesink location=testsequence01_%1d.log" F0 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=testsequence_%1d.png index=0 caps=\"image/png,framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! queue ! tensor_reposink silent=false slot-index=0 tensor_reposrc silent=false slot-index=0 caps=\"other/tensor,dimension=(string)3:100:100:1,type=(string)uint8,framerate=(fraction)30/1\" ! multifilesink location=testsequence01_%1d.log" 0F_n 0 1 $PERFORMANCE
# Fail Test : Negotiation Error (type)
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=testsequence_%1d.png index=0 caps=\"image/png,framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! queue ! tensor_reposink silent=false slot-index=0 tensor_reposrc silent=false slot-index=0 caps=\"other/tensor,dimension=(string)3:16:16:1,type=(string)float32,framerate=(fraction)30/1\" ! multifilesink location=testsequence01_%1d.log" F1 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=testsequence_%1d.png index=0 caps=\"image/png,framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! queue ! tensor_reposink silent=false slot-index=0 tensor_reposrc silent=false slot-index=0 caps=\"other/tensor,dimension=(string)3:16:16:1,type=(string)float32,framerate=(fraction)30/1\" ! multifilesink location=testsequence01_%1d.log" 1F_n 0 1 $PERFORMANCE
# Fail Test : Negotiation Error (MimeType)
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=testsequence_%1d.png index=0 caps=\"image/png,framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! queue ! tensor_reposink silent=false slot-index=0 tensor_reposrc silent=false slot-index=0 caps=\"other/tensors,num_tensors=1,framerate=(fraction)30/1,types=(string)uint8,dimensions=(string)3:16:16:1\" ! multifilesink location=testsequence01_%1d.log" F2 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=testsequence_%1d.png index=0 caps=\"image/png,framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! queue ! tensor_reposink silent=false slot-index=0 tensor_reposrc silent=false slot-index=0 caps=\"other/tensors,num_tensors=1,framerate=(fraction)30/1,types=(string)uint8,dimensions=(string)3:16:16:1\" ! multifilesink location=testsequence01_%1d.log" 2F_n 0 1 $PERFORMANCE
# The first gst buffer at tensor_reposrc is dummy.
gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=testsequence_%1d.png index=0 caps=\"image/png,framerate=(fraction)30/1\" ! pngdec ! tensor_converter ! queue ! tensor_reposink silent=false slot-index=0 tensor_reposrc silent=false slot-index=0 caps=\"other/tensor,dimension=(string)3:16:16:1,type=(string)uint8,framerate=(fraction)30/1\" ! multifilesink location=testsequence01_%1d.log" 1 0 0 $PERFORMANCE
/**
* @brief Test for caps negotiation failed.
*/
-TEST (tensor_sink_test, caps_error)
+TEST (tensor_sink_test, caps_error_n)
{
const guint num_buffers = 5;
TestOption option = { num_buffers, TEST_TYPE_NEGO_FAILED };
/**
* @brief Test NNStreamer pipeline construct with non-existent filter
*/
-TEST (nnstreamer_capi_construct_destruct, failed_01)
+TEST (nnstreamer_capi_construct_destruct, failure_01_n)
{
const char *pipeline = "nonexistsrc ! fakesink";
ml_pipeline_h handle;
/**
* @brief Test NNStreamer pipeline construct with erroneous pipeline
*/
-TEST (nnstreamer_capi_construct_destruct, failed_02)
+TEST (nnstreamer_capi_construct_destruct, failure_02_n)
{
const char *pipeline = "videotestsrc num_buffers=2 ! audioconvert ! fakesink";
ml_pipeline_h handle;
* @brief Test NNStreamer pipeline valve
* @detail Failure case to handle valve element with invalid param.
*/
-TEST (nnstreamer_capi_valve, failure_01)
+TEST (nnstreamer_capi_valve, failure_01_n)
{
ml_pipeline_h handle;
ml_pipeline_valve_h valve_h;
* @brief Test NNStreamer pipeline sink
* @detail Failure case to register callback with invalid param.
*/
-TEST (nnstreamer_capi_sink, failure_01)
+TEST (nnstreamer_capi_sink, failure_01_n)
{
ml_pipeline_h handle;
ml_pipeline_sink_h sinkhandle;
* @brief Test NNStreamer pipeline src
* @detail Failure case when pipeline is NULL.
*/
-TEST (nnstreamer_capi_src, failure_01)
+TEST (nnstreamer_capi_src, failure_01_n)
{
int status;
ml_pipeline_src_h srchandle;
* @brief Test NNStreamer pipeline src
* @detail Failure case when the name of source node is wrong.
*/
-TEST (nnstreamer_capi_src, failure_02)
+TEST (nnstreamer_capi_src, failure_02_n)
{
const char *pipeline = "appsrc is-live=true name=mysource ! valve name=valvex ! filesink";
ml_pipeline_h handle;
* @brief Test NNStreamer pipeline src
* @detail Failure case when the number of tensors is 0 or bigger than ML_TENSOR_SIZE_LIMIT;
*/
-TEST (nnstreamer_capi_src, failure_03)
+TEST (nnstreamer_capi_src, failure_03_n)
{
const char *pipeline = "appsrc name=srcx ! other/tensor,dimension=(string)4:1:1:1,type=(string)uint8,framerate=(fraction)0/1 ! tensor_sink";
ml_pipeline_h handle;
* @brief Test NNStreamer pipeline switch
* @detail Failure case to handle input-selector element with invalid param.
*/
-TEST (nnstreamer_capi_switch, failure_01)
+TEST (nnstreamer_capi_switch, failure_01_n)
{
ml_pipeline_h handle;
ml_pipeline_switch_h switchhandle;
/**
* @brief Test NNStreamer Utility for checking availability of NNFW
+ * @todo After adding sub-plugin for NNFW, this testcase should be fixed.
*/
TEST (nnstreamer_capi_util, availability_00)
{
* @brief Test NNStreamer single shot (tensorflow-lite)
* @detail Failure case with invalid param.
*/
-TEST (nnstreamer_capi_singleshot, failure_01)
+TEST (nnstreamer_capi_singleshot, failure_01_n)
{
ml_single_h single;
ml_tensors_info_h in_info, out_info;
int
main (int argc, char **argv)
{
+ int result;
+
testing::InitGoogleTest (&argc, argv);
- ml_set_feature_status(1);
+ /* ignore tizen feature status while running the testcases */
+ ml_set_feature_status (1);
+
+ result = RUN_ALL_TESTS ();
+
+ ml_set_feature_status (-1);
- return RUN_ALL_TESTS ();
+ return result;
}
testResult $? 7-8 "Golden test comparison" 0 1
# Fail Test for the option string is wrong
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=\"testsequence_%1d.png\" index=0 caps=\"image/png,framerate=\(fraction\)30/1\" ! pngdec ! videoconvert ! video/x-raw, format=RGB ! tensor_converter ! tensor_transform mode=arithmetic option=casttype:uint64,mul:65535 acceleration=false ! fakesink sync=true " 8 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=\"testsequence_%1d.png\" index=0 caps=\"image/png,framerate=\(fraction\)30/1\" ! pngdec ! videoconvert ! video/x-raw, format=RGB ! tensor_converter ! tensor_transform mode=arithmetic option=casttype:uint64,mul:65535 acceleration=false ! fakesink sync=true " 8F_n 0 1 $PERFORMANCE
report
# Fail Test: Unknown data type is given
# uint8 -> uint128
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=\"testsequence_%1d.png\" index=0 caps=\"image/png,framerate=\(fraction\)30/1\" ! pngdec ! videoconvert ! video/x-raw, format=BGRx ! tensor_converter ! tee name=t ! queue ! tensor_transform mode=typecast option=uint128 ! filesink location=\"testcase02-F.typecast.log\" sync=true t. ! queue ! filesink location=\"testcase02-F.direct.log\" sync=true" 2-F 0 1 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=\"testsequence_%1d.png\" index=0 caps=\"image/png,framerate=\(fraction\)30/1\" ! pngdec ! videoconvert ! video/x-raw, format=BGRx ! tensor_converter ! tee name=t ! queue ! tensor_transform mode=typecast option=uint128 ! filesink location=\"testcase02-F.typecast.log\" sync=true t. ! queue ! filesink location=\"testcase02-F.direct.log\" sync=true" 2F_n 0 1 $PERFORMANCE
gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} multifilesrc location=\"testsequence_%1d.png\" index=0 caps=\"image/png,framerate=\(fraction\)30/1\" ! pngdec ! videoconvert ! video/x-raw, format=BGRx ! tensor_converter ! tee name=t ! queue ! tensor_transform mode=typecast option=int8 ! filesink location=\"testcase03.typecast.log\" sync=true t. ! queue ! filesink location=\"testcase03.direct.log\" sync=true" 3 0 0 $PERFORMANCE
# uint8 -> int8