[apparmor] [patch] error out on failing libapparmor test_multi tests
Christian Boltz
apparmor at cboltz.de
Tue Dec 8 23:24:55 UTC 2015
Hello,
this patch adds a check-local target to libapparmor/testsuite/Makefile.am
that checks the logfile generated by the test_multi tests
(libaalogparse.log) and errors out if
- the logfile doesn't exist (which might mean that dejagnu isn't installed
- the logfile contains 'ERROR'
This isn't the best solution I can imagine, but it's the only/easiest
way I found that doesn't need changing of autogenerated files.
Also extend clean-local to delete libaalogparse.{log,sum}
Note: with this patch applied, libapparmor make check fails with
ERROR: Missing file ./test_multi/testcase_changehat_01.err
ERROR: Missing file ./test_multi/testcase_syslog_read.err
I'll add those as empty files when commiting this patch.
[ libapparmor-error-out-on-failing-test-multi.diff ]
=== modified file 'libraries/libapparmor/testsuite/Makefile.am'
--- libraries/libapparmor/testsuite/Makefile.am 2014-01-06 22:08:55 +0000
+++ libraries/libapparmor/testsuite/Makefile.am 2015-12-08 22:31:23 +0000
@@ -15,5 +15,10 @@
clean-local:
rm -rf tmp.err.* tmp.out.* site.exp site.bak test_multi/out
+ rm -f libaalogparse.log libaalogparse.sum
+
+check-local:
+ if ! test -f libaalogparse.log ; then echo '*** libaalogparse.log not found - is dejagnu installed? ***'; exit 1; fi
+ if grep ERROR libaalogparse.log ; then exit 1 ; fi
EXTRA_DIST = test_multi/*.in test_multi/*.out test_multi/*.err
Regards,
Christian Boltz
--
<suseROCKs> henne: [...] Can you link me to any documentation [...]?
<henne> suseROCKs: brain://henne/hardware/touchsmart
<suseROCKs> Firefox: Oops! There appears to be no brain:// associated
with henne
[from #opensuse-project]
More information about the AppArmor
mailing list