summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-08-07 12:13:35 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-08-07 12:13:35 +0530
commitee01e34a9a89ffbcb211eec6f6c64aa6b7530712 (patch)
tree6d5b3dfd0153d3680fcdec6ea82e16270c91a28b
parenta5d8d5349d4761873df3c5b36143dd04417d6f69 (diff)
downloadwallet-core-ee01e34a9a89ffbcb211eec6f6c64aa6b7530712.tar.gz
wallet-core-ee01e34a9a89ffbcb211eec6f6c64aa6b7530712.tar.bz2
wallet-core-ee01e34a9a89ffbcb211eec6f6c64aa6b7530712.zip
lingering
-rw-r--r--packages/taler-integrationtests/src/harness.ts18
1 files changed, 17 insertions, 1 deletions
diff --git a/packages/taler-integrationtests/src/harness.ts b/packages/taler-integrationtests/src/harness.ts
index 20b8a9941..6b848df52 100644
--- a/packages/taler-integrationtests/src/harness.ts
+++ b/packages/taler-integrationtests/src/harness.ts
@@ -265,6 +265,11 @@ export class GlobalTestState {
}
private shutdownSync(): void {
+ if (shouldLingerAlways()) {
+ console.log("*** test finished, but requested to linger");
+ console.log("*** test state can be found under", this.testDir);
+ return;
+ }
for (const s of this.servers) {
s.close();
s.removeAllListeners();
@@ -858,8 +863,19 @@ export interface MerchantInstanceConfig {
defaultPayDelay?: time.Duration;
}
+/**
+ * Check if the test should hang around after it failed.
+ */
function shouldLinger(): boolean {
- return process.env["TALER_TEST_KEEP"] == "1";
+ return process.env["TALER_TEST_LINGER"] == "1";
+}
+
+/**
+ * Check if the test should hang around even after it finished
+ * successfully.
+ */
+function shouldLingerAlways(): boolean {
+ return process.env["TALER_TEST_LINGER_ALWAYS"] == "1";
}
function updateCurrentSymlink(testDir: string): void {