From c04d4fdc26f7483beb4e56e838f9ba0c2e81560b Mon Sep 17 00:00:00 2001 From: J08nY Date: Sun, 22 Jul 2018 13:15:21 +0200 Subject: Add option for cleanup. --- src/cz/crcs/ectester/reader/test/CardCompositeSuite.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/cz/crcs/ectester/reader/test/CardCompositeSuite.java') diff --git a/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java b/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java index 5de8608..ec56901 100644 --- a/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java +++ b/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java @@ -55,7 +55,6 @@ public class CardCompositeSuite extends CardTestSuite { tests.add(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ", " + key.getDesc(), ecdh)); } doTest(CompoundTest.all(ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ".", tests.toArray(new Test[0]))); - new Command.Cleanup(this.card).send(); } @@ -105,9 +104,12 @@ public class CardCompositeSuite extends CardTestSuite { } else { description = testName + " test of " + curve.getId() + "."; } - Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.SUCCESS); - - doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, description, allocate, set, generate, ecdh, cleanup)); + if (cfg.cleanup) { + Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.SUCCESS); + doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, description, allocate, set, generate, ecdh, cleanup)); + } else { + doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, description, allocate, set, generate, ecdh)); + } } } -- cgit v1.2.3-70-g09d2