From fd94f9332dbd93fa830c3da3a67afe74f2a53639 Mon Sep 17 00:00:00 2001 From: "Thomas, Jason" Date: Mon, 28 Oct 2019 13:53:07 -0600 Subject: [PATCH 1/3] Stop if testcase and abort checked --- lib/cosmos/tools/test_runner/test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cosmos/tools/test_runner/test.rb b/lib/cosmos/tools/test_runner/test.rb index 3519315de..3cf9e0ac5 100644 --- a/lib/cosmos/tools/test_runner/test.rb +++ b/lib/cosmos/tools/test_runner/test.rb @@ -387,6 +387,7 @@ def run(&block) result = run_test_case(test_class, test_case, true) results << result yield result if block_given? + raise StopScript if (result.exceptions and test_class.abort_on_exception) or result.stopped when :TEST_SETUP result = run_test_setup(test_class, true) if result From 5f2b081316c4ba5404717ee9a946ea6d91e97f49 Mon Sep 17 00:00:00 2001 From: "Thomas, Jason" Date: Mon, 18 Nov 2019 16:43:36 -0700 Subject: [PATCH 2/3] raise StopScript in setup and teardown --- lib/cosmos/tools/test_runner/test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/cosmos/tools/test_runner/test.rb b/lib/cosmos/tools/test_runner/test.rb index 3cf9e0ac5..e634774a6 100644 --- a/lib/cosmos/tools/test_runner/test.rb +++ b/lib/cosmos/tools/test_runner/test.rb @@ -393,12 +393,14 @@ def run(&block) if result results << result yield result if block_given? + raise StopScript if (result.exceptions and test_class.abort_on_exception) or result.stopped end when :TEST_TEARDOWN result = run_test_teardown(test_class, true) if result results << result yield result if block_given? + raise StopScript if (result.exceptions and test_class.abort_on_exception) or result.stopped end end end From 2bd9275a542753f88de75cad20bce4881ca65505 Mon Sep 17 00:00:00 2001 From: Ryan Melton Date: Thu, 21 Nov 2019 20:11:38 -0700 Subject: [PATCH 3/3] Update test.rb Also fix earlier setup and teardown to support abort_on_exception --- lib/cosmos/tools/test_runner/test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cosmos/tools/test_runner/test.rb b/lib/cosmos/tools/test_runner/test.rb index e634774a6..3ea8bdc34 100644 --- a/lib/cosmos/tools/test_runner/test.rb +++ b/lib/cosmos/tools/test_runner/test.rb @@ -126,7 +126,7 @@ def run if result results << result yield result if block_given? - raise StopScript if result.stopped + raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped end # Run each test case @@ -141,7 +141,7 @@ def run if result results << result yield result if block_given? - raise StopScript if result.stopped + raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped end results