summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-17 14:18:05 +0200
committerFlorian Dold <florian@dold.me>2021-06-17 14:18:05 +0200
commita7c1f7d012d02c0ecf4c3374d3e1c13219ad1d41 (patch)
tree5b55b89ce0bc759b55e2633259cdd51dcfef90e7
parent5df7ddba97aa4482c781bfe8e87f60c3bc195ae4 (diff)
downloadwallet-core-a7c1f7d012d02c0ecf4c3374d3e1c13219ad1d41.tar.gz
wallet-core-a7c1f7d012d02c0ecf4c3374d3e1c13219ad1d41.tar.bz2
wallet-core-a7c1f7d012d02c0ecf4c3374d3e1c13219ad1d41.zip
add --quiet flag to test runner
-rw-r--r--packages/taler-wallet-cli/src/index.ts4
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/testrunner.ts7
2 files changed, 9 insertions, 2 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index 695f5fd63..3949444a1 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -886,11 +886,15 @@ testCli
.flag("dryRun", ["--dry"], {
help: "Only print tests that will be selected to run.",
})
+ .flag("quiet", ["--quiet"], {
+ help: "Produce less output.",
+ })
.action(async (args) => {
await runTests({
includePattern: args.runIntegrationtests.pattern,
suiteSpec: args.runIntegrationtests.suites,
dryRun: args.runIntegrationtests.dryRun,
+ verbosity: args.runIntegrationtests.quiet ? 0 : 1,
});
});
diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
index c2bb69c11..a42c79ac7 100644
--- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
@@ -138,6 +138,7 @@ export interface TestRunSpec {
includePattern?: string;
suiteSpec?: string;
dryRun?: boolean;
+ verbosity: number;
}
export interface TestInfo {
@@ -244,8 +245,10 @@ export async function runTests(spec: TestRunSpec) {
const harnessLogFilename = path.join(testRootDir, testName, "harness.log");
const harnessLogStream = fs.createWriteStream(harnessLogFilename);
- currentChild.stderr?.pipe(process.stderr);
- currentChild.stdout?.pipe(process.stdout);
+ if (spec.verbosity > 0) {
+ currentChild.stderr?.pipe(process.stderr);
+ currentChild.stdout?.pipe(process.stdout);
+ }
currentChild.stdout?.pipe(harnessLogStream);
currentChild.stderr?.pipe(harnessLogStream);