From 0002a5a173f5bb71075d07a607f56b891f7ddb87 Mon Sep 17 00:00:00 2001 From: Dongju Chae Date: Thu, 16 Jan 2020 16:14:43 +0900 Subject: [PATCH] [Fix/Log] Omit logs for third-party libraries (e.g., libnpuvision) This commit omits dirty logs for third-party libraries including libnpuvision and encoder. Such logs are printed as standrad output, thus we can redirect them to /dev/null. Signed-off-by: Dongju Chae --- debian/rules | 8 ++++---- packaging/npu-engine.spec | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/rules b/debian/rules index 11229f6..e70227f 100755 --- a/debian/rules +++ b/debian/rules @@ -55,9 +55,9 @@ override_dh_auto_test: /opt/trinity/share/npuvision/testdata/{} 1 # Multi-layer test data mkdir -p $(CURDIR)/multi - cd multi && $(ROOT_DIR)/build/tools/gen-testdata/gen-testdata + cd multi && $(ROOT_DIR)/build/tools/gen-testdata/gen-testdata > /dev/null find $(CURDIR)/multi -name 'testcase*' -type d -exec basename {} \; | \ - xargs -I{} ${NPU_TRINITY_INSTALL_PREFIX}/bin/encoder multi/{}/program.asm multi/{}/program.bin + xargs -I{} ${NPU_TRINITY_INSTALL_PREFIX}/bin/encoder multi/{}/program.asm multi/{}/program.bin > /dev/null find $(CURDIR)/multi -name 'testcase*_v1' -type d -exec basename {} \; |\ xargs -I{} $(ROOT_DIR)/tools/gen-testdata/model_gen.py multi/{} 1 find $(CURDIR)/multi -name 'testcase*_v2' -type d -exec basename {} \; |\ @@ -67,8 +67,8 @@ override_dh_auto_test: find $(CURDIR)/multi -type f -name 'program.*' -delete # single/multi-layer model test - ./build/src/test/apptests/apptest_example_visa single - ./build/src/test/apptests/apptest_example_visa multi + ./build/src/test/apptests/apptest_example_visa single > /dev/null + ./build/src/test/apptests/apptest_example_visa multi > /dev/null override_dh_auto_install: DESTDIR=$(CURDIR)/debian/tmp ninja -C build install diff --git a/packaging/npu-engine.spec b/packaging/npu-engine.spec index f7d936e..d0c79c0 100644 --- a/packaging/npu-engine.spec +++ b/packaging/npu-engine.spec @@ -95,9 +95,9 @@ find %{testdatadir_single_raw} -name 'core*' -type d -exec basename {} .asm \; | # multi layer mkdir -p multi-intermediate pushd multi-intermediate -find %{_builddir} -name gen-testdata -type f -exec {} \; +find %{_builddir} -name gen-testdata -type f -exec {} \; > /dev/null find . -name 'testcase*' -type d -exec basename {} \; | \ - xargs -I{} %{_bindir}/encoder {}/program.asm {}/program.bin + xargs -I{} %{_bindir}/encoder {}/program.asm {}/program.bin > /dev/null find . -name 'testcase*' -type d -exec basename {} \; | \ xargs -I{} mkdir -p %{buildroot}%{testdatadir_out}/multi/{} popd @@ -136,8 +136,8 @@ find %{buildroot} -name multi.tar.gz -delete popd # Run example_visa - ./build/src/test/apptests/apptest_example_visa %{buildroot}%{testdatadir_out}/single - ./build/src/test/apptests/apptest_example_visa %{buildroot}%{testdatadir_out}/multi + ./build/src/test/apptests/apptest_example_visa %{buildroot}%{testdatadir_out}/single > /dev/null + ./build/src/test/apptests/apptest_example_visa %{buildroot}%{testdatadir_out}/multi > /dev/null %endif # Analyze test coverage %if 0%{?test_coverage} -- 2.7.4