harness: mark some tests as experimental

This commit is contained in:
Florian Dold 2023-01-18 19:58:30 +01:00
parent 598de5b0d5
commit 785f8163ca
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
5 changed files with 20 additions and 1 deletions

View File

@ -229,7 +229,6 @@ deploymentConfigCli
); );
}); });
testingCli.subcommand("logtest", "logtest").action(async (args) => { testingCli.subcommand("logtest", "logtest").action(async (args) => {
logger.trace("This is a trace message."); logger.trace("This is a trace message.");
logger.info("This is an info message."); logger.info("This is an info message.");
@ -248,6 +247,9 @@ testingCli
if (t.excludeByDefault) { if (t.excludeByDefault) {
s += ` [excluded by default]`; s += ` [excluded by default]`;
} }
if (t.experimental) {
s += ` [experimental]`;
}
console.log(s); console.log(s);
} }
}); });
@ -263,6 +265,9 @@ testingCli
.flag("dryRun", ["--dry"], { .flag("dryRun", ["--dry"], {
help: "Only print tests that will be selected to run.", help: "Only print tests that will be selected to run.",
}) })
.flag("experimental", ["--experimental"], {
help: "Include tests marked as experimental",
})
.flag("quiet", ["--quiet"], { .flag("quiet", ["--quiet"], {
help: "Produce less output.", help: "Produce less output.",
}) })
@ -272,6 +277,7 @@ testingCli
suiteSpec: args.runIntegrationtests.suites, suiteSpec: args.runIntegrationtests.suites,
dryRun: args.runIntegrationtests.dryRun, dryRun: args.runIntegrationtests.dryRun,
verbosity: args.runIntegrationtests.quiet ? 0 : 1, verbosity: args.runIntegrationtests.quiet ? 0 : 1,
includeExperimental: args.runIntegrationtests.experimental ?? false,
}); });
}); });

View File

@ -202,3 +202,5 @@ export async function runKycTest(t: GlobalTestState) {
} }
runKycTest.suites = ["wallet"]; runKycTest.suites = ["wallet"];
// See bugs.taler.net/n/7599
runKycTest.experimental = true;

View File

@ -166,3 +166,5 @@ export async function runWalletBackupBasicTest(t: GlobalTestState) {
} }
runWalletBackupBasicTest.suites = ["wallet", "wallet-backup"]; runWalletBackupBasicTest.suites = ["wallet", "wallet-backup"];
// See https://bugs.taler.net/n/7598
runWalletBackupBasicTest.experimental = true;

View File

@ -172,3 +172,5 @@ export async function runWalletBackupDoublespendTest(t: GlobalTestState) {
} }
runWalletBackupDoublespendTest.suites = ["wallet", "wallet-backup"]; runWalletBackupDoublespendTest.suites = ["wallet", "wallet-backup"];
// See https://bugs.taler.net/n/7598
runWalletBackupDoublespendTest.experimental = true;

View File

@ -111,6 +111,7 @@ interface TestMainFunction {
(t: GlobalTestState): Promise<void>; (t: GlobalTestState): Promise<void>;
timeoutMs?: number; timeoutMs?: number;
excludeByDefault?: boolean; excludeByDefault?: boolean;
experimental?: boolean;
suites?: string[]; suites?: string[];
} }
@ -194,6 +195,7 @@ export interface TestRunSpec {
includePattern?: string; includePattern?: string;
suiteSpec?: string; suiteSpec?: string;
dryRun?: boolean; dryRun?: boolean;
includeExperimental: boolean;
verbosity: number; verbosity: number;
} }
@ -201,6 +203,7 @@ export interface TestInfo {
name: string; name: string;
suites: string[]; suites: string[];
excludeByDefault: boolean; excludeByDefault: boolean;
experimental: boolean;
} }
function updateCurrentSymlink(testDir: string): void { function updateCurrentSymlink(testDir: string): void {
@ -284,6 +287,9 @@ export async function runTests(spec: TestRunSpec) {
if (testCase.excludeByDefault) { if (testCase.excludeByDefault) {
continue; continue;
} }
if (testCase.experimental && !spec.includeExperimental) {
continue;
}
} }
if (spec.dryRun) { if (spec.dryRun) {
@ -441,6 +447,7 @@ export function getTestInfo(): TestInfo[] {
name: getTestName(x), name: getTestName(x),
suites: x.suites ?? [], suites: x.suites ?? [],
excludeByDefault: x.excludeByDefault ?? false, excludeByDefault: x.excludeByDefault ?? false,
experimental: x.experimental ?? false,
})); }));
} }