From: sewon.oh Date: Tue, 13 Nov 2018 02:32:16 +0000 (+0900) Subject: [TEST] Add flag for unit test X-Git-Tag: v0.0.3~102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b71f6bd8aa95498e0640b5bf7a4141a2f09a65c9;p=platform%2Fupstream%2Fnnstreamer.git [TEST] Add flag for unit test Able to choice whether unit test or not. So I think no more need time out flag. therefore add unit test flag and remove timeout flag Signed-off-by: sewon.oh --- diff --git a/packaging/nnstreamer.spec b/packaging/nnstreamer.spec index 1c3cb1f..34109c3 100644 --- a/packaging/nnstreamer.spec +++ b/packaging/nnstreamer.spec @@ -91,35 +91,13 @@ export GST_PLUGIN_PATH=$(pwd) export LD_LIBRARY_PATH=$(pwd):$(pwd)/gst/tensor_filter %cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DENABLE_MODEL_DOWNLOAD=OFF make %{?_smp_mflags} -./tests/unittest_common -./tests/unittest_sink --gst-plugin-path=. -./tests/unittest_plugins --gst-plugin-path=. -popd -pushd tests -# Able to release timeout while gbs build using option '--define "timeout 1"' -# Default is to apply time limit. -%if 0%{?timeout} +%if 0%{?unit_test} + ./tests/unittest_common + ./tests/unittest_sink --gst-plugin-path=. + ./tests/unittest_plugins --gst-plugin-path=. + popd + pushd tests ssat -%else - # The ssat requires 6~7min to run armv7l binary files in the current CI server. - # The timeout value is 10min as a heuristic value from our experience. - timeout=600 - ssat & - pid=$! - # CAUTION: Note that you have to keep the coding style of the existing statement - # in case that you have to update the below statement in the future. - # a. Do not run repetitive statement(ex. while) to avoid too log messages in the log file. - # b. Declare appropriate heuristic timeout value - # c. Do not declare too long sleep time to keep the reasonable waiting time after submitting PR - (sleep $timeout - kill $pid - if [[ "$?" -eq 0 ]]; then - echo "[DEBUG] GBS is stopped because of 'ssat' timeout(10min)" - exit 124 # 124 is ubuntu status code of timeout - fi) & - pid2=$! - wait $pid - kill $pid2 %endif popd