X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Funit_test.ksh;h=74bc04814bdc774c6f34715ef1db2e9a8f10994c;hb=a41c6f5f26b3a44009f4aff3df3f83b9a79ace01;hp=21848afff00b1a726afa6811b4a6570a029fb38e;hpb=8790bf0c4f4f08fd05853afa67e211112b344a42;p=ric-plt%2Flib%2Frmr.git diff --git a/test/unit_test.ksh b/test/unit_test.ksh index 21848af..74bc048 100755 --- a/test/unit_test.ksh +++ b/test/unit_test.ksh @@ -267,6 +267,7 @@ verbose=0 show_all=1 # show all things -F sets to show failures only strict=0 # -s (strict) will set; when off, coverage state ignored in final pass/fail show_output=0 # show output from each test execution (-S) +quiet=0 while [[ $1 == "-"* ]] do @@ -285,6 +286,7 @@ do -s) strict=1;; # coverage counts toward pass/fail state -S) show_output=1;; # test output shown even on success -v) (( verbose++ ));; + -q) quiet=1;; # less chatty when spilling error log files -h) usage; exit 0;; --help) usage; exit 0;; @@ -353,7 +355,12 @@ do if ! ./${tfile%.c} >/tmp/PID$$.log 2>&1 then echo "[FAIL] unit test failed for: $tfile" - cat /tmp/PID$$.log + if (( quiet )) + then + grep "^<" /tmp/PID$$.log # in quiet mode just dump <...> messages which are assumed from the test programme not appl + else + cat /tmp/PID$$.log + fi (( ut_errors++ )) # cause failure even if not in strict mode continue # skip coverage tests for this else