Skip to content

Commit

Permalink
deqp: Add --no-rerun-tests flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Wallbraker committed Jun 21, 2019
1 parent fac4209 commit 31eaba8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/deqp/config/args.volt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import deqp.config.info;

fn parseArgs(settings: Settings, args: string[])
{
printFailing: bool;
printFailing, noRerunTests: bool;
threads, batchSize, randomize: i32;
ctsBuildDir, resultsFile, tempDir, regressionFile: string;
testNamesFiles, regressionFiles: string[];
Expand All @@ -27,6 +27,7 @@ fn parseArgs(settings: Settings, args: string[])
watt.getopt(ref args, "test-names-file", ref testNamesFiles);
watt.getopt(ref args, "results-file", ref resultsFile);
watt.getopt(ref args, "temp-dir", ref tempDir);
watt.getopt(ref args, "no-rerun-tests", ref noRerunTests);
watt.getopt(ref args, "print-failing", ref printFailing);
watt.getopt(ref args, "randomize", ref randomize);
watt.getopt(ref args, "check|regression-file", ref regressionFiles);
Expand Down Expand Up @@ -56,6 +57,9 @@ fn parseArgs(settings: Settings, args: string[])
if (printFailing) {
settings.printFailing = printFailing;
}
if (noRerunTests) {
settings.noRerunTests = noRerunTests;
}
if (regressionFiles !is null) {
settings.regressionFiles = regressionFiles;
}
Expand Down
1 change: 1 addition & 0 deletions src/deqp/config/info.volt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fn printConfig(s: Settings)
info("\tthreads = %s", s.threads);
info("\tresultsFile = '%s'", s.resultsFile);
info("\ttempDir = '%s'", s.tempDir);
info("\tnoRerunTests = %s", s.noRerunTests);
}

fn printAllArgsAndConfig()
Expand Down
3 changes: 3 additions & 0 deletions src/deqp/config/parser.volt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ fn parseConfigFile(s: Settings)
if (root.hasKey("printFailing")) {
s.printFailing = root["printFailing"].boolean();
}
if (root.hasKey("noRerunTests")) {
s.noRerunTests = root["noRerunTests"].boolean();
}
if (root.hasKey("regressionFile")) {
s.resultsFile = root["regressionFile"].str();
}
Expand Down
5 changes: 5 additions & 0 deletions src/deqp/driver.volt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public:

testNamesFiles: string[];
ctsBuildDir: string;
noRerunTests: bool = false;

batchSize: u32;

Expand Down Expand Up @@ -260,6 +261,10 @@ public:

info(" :: Rerunning failed test(s).");

if (settings.noRerunTests) {
info("\tRerunning tests disabled by arguments or settings");
}

if ((total / 8) > (bad - inc)) {
mask |= 1u << Result.Fail;
mask |= 1u << Result.InternalError;
Expand Down

0 comments on commit 31eaba8

Please sign in to comment.