From 232047fdee815d9cf8c92b6853c5bc8039f2719c Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 13 Apr 2016 02:36:47 -0700 Subject: test: ensure that checkmk always gets the same list of tests --- bin/run_tests | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bin') diff --git a/bin/run_tests b/bin/run_tests index 5733f526..b6784ed5 100755 --- a/bin/run_tests +++ b/bin/run_tests @@ -82,6 +82,8 @@ end class LeapTest < MiniTest::Unit::TestCase class Pass < MiniTest::Assertion end + class SilentPass < Pass + end class Ignore < MiniTest::Assertion end @@ -132,6 +134,12 @@ class LeapTest < MiniTest::Unit::TestCase raise LeapTest::Pass end + # + # This is just like pass(), but the result is normally silent, unless `run_tests --test TEST` + def silent_pass + raise LeapTest::SilentPass + end + # # Called when the test should be silently ignored. # @@ -221,6 +229,10 @@ class LeapRunner < MiniTest::Unit if @verbose report_line("IGNORE", klass, meth, e, e.message) end + when LeapTest::SilentPass then + if $pinned_test_method || $output_format == :checkmk + report_line("PASS", klass, meth) + end when LeapTest::Pass then @passes += 1 report_line("PASS", klass, meth) -- cgit v1.2.3