override_dh_auto_test:
./packaging/run_unittests_binaries.sh ./tests
+ ./packaging/run_unittests_binaries.sh ./tests/nnstreamer_edge
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes), yes)
ifeq ($(DEB_HOST_ARCH), amd64)
if [ -f './tests/tizen_nnfw_runtime/unittest_nnfw_runtime_raw' ]; then ./packaging/run_unittests_binaries.sh ./tests/tizen_nnfw_runtime/unittest_nnfw_runtime_raw; fi
%endif
# Unit Testing Uses SSAT (https://github.com/myungjoo/SSAT.git)
-%if 0%{?unit_test}
+%if 0%{?unit_test} || 0%{?edge_test}
BuildRequires: ssat >= 1.1.0
%endif
bash %{test_script} ./tests
bash %{test_script} ./tests/cpp_methods
bash %{test_script} ./tests/nnstreamer_filter_extensions_common
+ bash %{test_script} ./tests/nnstreamer_edge
%if 0%{mvncsdk2_support}
LD_LIBRARY_PATH=${NNSTREAMER_BUILD_ROOT_PATH}/tests/nnstreamer_filter_mvncsdk2:. bash %{test_script} ./tests/nnstreamer_filter_mvncsdk2/unittest_filter_mvncsdk2
%endif
popd
python3 tools/development/count_test_cases.py build tests/summary.txt
-%endif #if unit_test
+%else
+%if 0%{?edge_test}
+ bash %{test_script} tests/nnstreamer_edge
+ pushd tests/nnstreamer_edge
+ ssat -n -p=1 --summary summary.txt -cn _n
+ popd
+ python3 tools/development/count_test_cases.py build tests/nnstreamer_edge/summary.txt
+%endif
+%endif
%install
DESTDIR=%{buildroot} ninja -C build install
test('unittest_join', unittest_join, env: testenv)
- # Run unittest_query
- if nnstreamer_edge_support_is_available
- unittest_query = executable('unittest_query',
- join_paths('nnstreamer_query', 'unittest_query.cc'),
- dependencies: [nnstreamer_unittest_deps],
- install: get_option('install-test'),
- install_dir: unittest_install_dir
- )
-
- test('unittest_query', unittest_query, env: testenv)
- endif
-
- # Run unittest_edge
- if nnstreamer_edge_support_is_available
- unittest_edge = executable('unittest_edge',
- join_paths('nnstreamer_edge', 'unittest_edge.cc'),
- dependencies: [nnstreamer_unittest_deps],
- install: get_option('install-test'),
- install_dir: unittest_install_dir
- )
-
- test('unittest_edge', unittest_edge, env: testenv)
- endif
-
# Run unittest_mqtt
if mqtt_support_is_available
unittest_mqtt_w_helper = executable('unittest_mqtt_w_helper',
if mxnet_support_is_available
subdir('nnstreamer_filter_mxnet')
endif
+
+ if nnstreamer_edge_support_is_available
+ subdir('nnstreamer_edge')
+ endif
endif # gtest_dep.found()
tensor_filter_ext_enabled = tflite_support_is_available or \
}
# Run edge sink server as echo server with default address option.
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} \
videotestsrc is-live=true ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tee name=t \
t. ! queue ! multifilesink location=raw1_%1d.log \
wait $pid
# Run edge sink server as echo server with default address option. (multi clients)
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} \
videotestsrc is-live=true ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tee name=t \
t. ! queue ! multifilesink location=raw2_%1d.log \
wait $pid
# Cap: Flexible Tensor
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} \
videotestsrc is-live=true ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tensor_converter ! other/tensors,format=flexible ! tee name=t \
t. ! queue ! multifilesink location=raw3_%1d.log \
wait $pid
# Cap: Tensor
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} \
videotestsrc is-live=true ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tensor_converter ! other/tensors,num_tensors=1,dimensions=3:300:300:1,types=uint8,format=static ! tee name=t \
t. ! queue ! multifilesink location=raw4_%1d.log \
wait $pid
# Cap: Audio
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} \
audiotestsrc ! audioconvert ! tee name=t \
t. ! queue ! multifilesink location=raw5_%1d.log \
wait $pid
# Cap: Text
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
RANDOM_TEXT="test.txt"
python3 generate_random_text.py "--file_name ${RANDOM_TEXT}"
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} \
--- /dev/null
+unittest_edge = executable('unittest_edge',
+ join_paths('edge', 'unittest_edge.cc'),
+ dependencies: [nnstreamer_unittest_deps],
+ install: get_option('install-test'),
+ install_dir: unittest_install_dir
+)
+
+test('unittest_edge', unittest_edge, env: testenv)
+
+# Run unittest_query
+unittest_query = executable('unittest_query',
+ join_paths('query', 'unittest_query.cc'),
+ dependencies: [nnstreamer_unittest_deps],
+ install: get_option('install-test'),
+ install_dir: unittest_install_dir
+)
+
+test('unittest_query', unittest_query, env: testenv)
}
# Run tensor query server as echo server with default address option.
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_query_serversrc port=${PORT} ! other/tensors,format=static,num_tensors=1,dimensions=(string)3:300:300:1,types=(string)uint8 ! tensor_query_serversink async=false" 1-1 0 0 30
pid=$!
gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc is-live=true num-buffers=10 ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tensor_converter ! tee name = t t. ! queue ! multifilesink location= raw1_%1d.log t. ! queue ! tensor_query_client dest-port=${PORT} ! multifilesink location=result1_%1d.log sync=true " 1-2 0 0 $PERFORMANCE
wait $pid
# Run tensor query server as echo server with given address option. (multi clients)
-PORT1=`python3 ../get_available_port.py`
+PORT1=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_query_serversrc host=127.0.0.1 port=${PORT1} ! other/tensors,format=static,num_tensors=1,dimensions=(string)3:300:300:1,types=(string)uint8 ! tensor_query_serversink async=false" 2-1 0 0 30
pid=$!
gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc is-live=true num-buffers=10 ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tensor_converter ! tee name = t t. ! queue ! multifilesink location= raw2_%1d.log t. ! queue ! tensor_query_client host=127.0.0.1 port=0 dest-host=127.0.0.1 dest-port=${PORT1} ! multifilesink location=result2_%1d.log" 2-2 0 0 $PERFORMANCE
wait $pid
# Test flexible tensors
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_query_serversrc port=${PORT} ! other/tensors,format=flexible ! tensor_query_serversink async=false" 3-1 0 0 30
pid=$!
gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc is-live=true num-buffers=10 ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tensor_converter ! other/tensors,format=flexible ! tee name = t t. ! queue ! multifilesink location= raw3_%1d.log t. ! queue ! tensor_query_client dest-port=${PORT} ! multifilesink location=result3_%1d.log" 3-2 0 0 $PERFORMANCE
wait $pid
# Test multiple query server src and sink.
-PORT1=`python3 ../get_available_port.py`
-PORT2=`python3 ../get_available_port.py`
-PORT3=`python3 ../get_available_port.py`
-PORT4=`python3 ../get_available_port.py`
+PORT1=`python3 ../../get_available_port.py`
+PORT2=`python3 ../../get_available_port.py`
+PORT3=`python3 ../../get_available_port.py`
+PORT4=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_query_serversrc id=0 port=${PORT1} ! other/tensors,format=flexible ! tensor_query_serversink id=0 async=false \
tensor_query_serversrc id=1 port=${PORT2} ! other/tensors,format=flexible ! tensor_query_serversink id=1 async=false" 5-1 0 0 30
pid=$!
wait $pid
# Sever src cap: Video, Server sink cap: Viedo test
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_query_serversrc port=${PORT} ! video/x-raw,width=300,height=300,format=RGB,framerate=0/1 ! tensor_query_serversink async=false" 6-1 0 0 30
pid=$!
gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc is-live=true num-buffers=10 ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tee name = t t. ! queue ! multifilesink location= raw6_%1d.log t. ! queue ! tensor_query_client dest-port=${PORT} ! multifilesink location=result6_%1d.log" 6-2 0 0 $PERFORMANCE
wait $pid
# Sever src cap: Video, Server sink cap: Tensor test
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_query_serversrc port=${PORT} ! video/x-raw,width=300,height=300,format=RGB,framerate=0/1 ! tensor_converter ! tensor_query_serversink async=false" 7-1 0 0 30
pid=$!
gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc is-live=true num-buffers=10 ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tee name = t t. ! queue ! multifilesink location= raw7_%1d.log t. ! queue ! tensor_query_client dest-port=${PORT} ! multifilesink location=result7_%1d.log" 7-2 0 0 $PERFORMANCE
wait $pid
# Sever src cap: Tensor, Server sink cap: Video test
-PORT=`python3 ../get_available_port.py`
+PORT=`python3 ../../get_available_port.py`
gstTestBackground "--gst-plugin-path=${PATH_TO_PLUGIN} tensor_query_serversrc port=${PORT} ! other/tensors,format=static,num_tensors=1,dimensions=(string)3:300:300:1,types=(string)uint8,framerate=0/1 ! tensor_decoder mode=direct_video ! videoconvert ! tensor_query_serversink async=false" 8-1 0 0 30
pid=$!
gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} videotestsrc is-live=true num-buffers=10 ! videoconvert ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tensor_converter ! tee name = t t. ! queue ! multifilesink location= raw8_%1d.log t. ! queue ! tensor_query_client dest-port=${PORT} ! multifilesink location=result8_%1d.log" 8-2 0 0 $PERFORMANCE