diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-06-18 00:28:18 +0300 |
---|---|---|
committer | Stephen Hemminger <shemming@brocade.com> | 2015-06-24 23:37:26 -0400 |
commit | 30383b074de101c778bc65c36e2b0d4690d3d6dc (patch) | |
tree | 166dbc21df1064a39b6c9595170b985bbee3219f /testsuite/Makefile | |
parent | ad1fe0d8e976a5f7815f930fddfa1d94114c3fa8 (diff) |
tests: Add output testing
Added possibility to check command output by grep from the testing
script.
Now TMP_OUT & TMP_ERR are passed from Makefile and changed to
STD_ERR & STD_OUT.
Also changed some existing tests to make output testing.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Diffstat (limited to 'testsuite/Makefile')
-rw-r--r-- | testsuite/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/Makefile b/testsuite/Makefile index 4b945b0c..20276500 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -52,6 +52,9 @@ endif @for i in $(IPVERS); do \ o=`echo $$i | sed -e 's/iproute2\///'`; \ echo -n "Running $@ [$$o/`uname -r`]: "; \ + TMP_ERR=`mktemp /tmp/tc_testsuite.XXXXXX`; \ + TMP_OUT=`mktemp /tmp/tc_testsuite.XXXXXX`; \ + STD_ERR="$$TMP_ERR" STD_OUT="$$TMP_OUT" \ TC="$$i/tc/tc" IP="$$i/ip/ip" DEV="$(DEV)" IPVER="$@" SNAME="$$i" \ ERRF="$(RESULTS_DIR)/$@.$$o.err" $(KENV) $(PREFIX) tests/$@ > $(RESULTS_DIR)/$@.$$o.out; \ if [ "$$?" = "127" ]; then \ @@ -61,5 +64,6 @@ endif else \ echo "PASS"; \ fi; \ + rm "$$TMP_ERR" "$$TMP_OUT"; \ dmesg > $(RESULTS_DIR)/$@.$$o.dmesg; \ done |