aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java
diff options
context:
space:
mode:
authorJ08nY2018-07-22 13:15:21 +0200
committerJ08nY2018-07-22 13:16:27 +0200
commitc04d4fdc26f7483beb4e56e838f9ba0c2e81560b (patch)
treeecebfb18694f15429125208d5fef6187ae390fa9 /src/cz/crcs/ectester/reader/test/CardCompositeSuite.java
parent1c678ec14afad688e0f4913dc478394d429ad6ee (diff)
downloadECTester-c04d4fdc26f7483beb4e56e838f9ba0c2e81560b.tar.gz
ECTester-c04d4fdc26f7483beb4e56e838f9ba0c2e81560b.tar.zst
ECTester-c04d4fdc26f7483beb4e56e838f9ba0c2e81560b.zip
Add option for cleanup.
Diffstat (limited to 'src/cz/crcs/ectester/reader/test/CardCompositeSuite.java')
-rw-r--r--src/cz/crcs/ectester/reader/test/CardCompositeSuite.java10
1 files changed, 6 insertions, 4 deletions
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));
+ }
}
}