Skip to content

Commit

Permalink
Make the CTS debuggable again
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Nov 8, 2023
1 parent 2835c6b commit e9d3c3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/common/runtime/helper/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface CTSOptions {
debug: boolean;
compatibility: boolean;
unrollConstEvalLoops: boolean;
noRaceWithRejectOnTimeout: boolean;
powerPreference?: GPUPowerPreference | '';
}

Expand All @@ -37,6 +38,7 @@ export const kDefaultCTSOptions: CTSOptions = {
debug: true,
compatibility: false,
unrollConstEvalLoops: false,
noRaceWithRejectOnTimeout: false,
powerPreference: '',
};

Expand All @@ -63,6 +65,7 @@ export const kCTSOptionsInfo: OptionsInfos<CTSOptions> = {
debug: { description: 'show more info' },
compatibility: { description: 'run in compatibility mode' },
unrollConstEvalLoops: { description: 'unroll const eval loops in WGSL' },
noRaceWithRejectOnTimeout: { description: 'turn off race timeout' },
powerPreference: {
description: 'set default powerPreference for some tests',
parser: optionString,
Expand Down
10 changes: 9 additions & 1 deletion src/common/runtime/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,17 @@ const { queries: qs, options } = parseSearchParamLikeWithOptions(
kStandaloneOptionsInfos,
window.location.search || rootQuerySpec
);
const { runnow, debug, unrollConstEvalLoops, powerPreference, compatibility } = options;
const {
runnow,
debug,
unrollConstEvalLoops,
powerPreference,
compatibility,
noRaceWithRejectOnTimeout,
} = options;
globalTestConfig.unrollConstEvalLoops = unrollConstEvalLoops;
globalTestConfig.compatibility = compatibility;
globalTestConfig.noRaceWithRejectOnTimeout = noRaceWithRejectOnTimeout;

Logger.globalDebugMode = debug;
const logger = new Logger();
Expand Down

0 comments on commit e9d3c3a

Please sign in to comment.