From a3f923e66b05ffc12037b239995f463f81ea229d Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 13 May 2014 02:14:37 -0700 Subject: added simple shorewall whitebox test (close #5649) --- bin/run_tests | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bin') diff --git a/bin/run_tests b/bin/run_tests index 9102c325..526aa83a 100755 --- a/bin/run_tests +++ b/bin/run_tests @@ -287,6 +287,16 @@ def assert_running(process) assert pgrep(process).any?, "No running process for #{process}" end +# +# runs the specified command, failing on a non-zero exit status. +# +def assert_run(command) + output = `#{command}` + if $?.exitstatus != 0 + fail "Error running `#{command}`:\n#{output}" + end +end + # # Custom test runner in order to modify the output. # -- cgit v1.2.3