[canvaskit] Add config key and manual mode to unit test harness.

Change-Id: Ic72f31ba7833c23f7baf4872d05671a7c3808e34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333216
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
Kevin Lubick 2020-11-09 14:38:02 -05:00
parent 339f0ee2a6
commit 823b1537f7
4 changed files with 23 additions and 5 deletions

View File

@ -1789,10 +1789,11 @@ func (b *jobBuilder) runWasmGMTests() {
"--tryjob_id", specs.PLACEHOLDER_BUILDBUCKET_BUILD_ID,
// TODO(kjlubick, nifong) Make these not hard coded if we change the configs we test on.
"--webgl_version", "2", // 0 means CPU ; this flag controls cpu_or_gpu and extra_config
"--gold_key", "browser:Chrome",
"--gold_key", "alpha_type:Premul",
"--gold_key", "arch:wasm",
"--gold_key", "browser:Chrome",
"--gold_key", "color_depth:8888",
"--gold_key", "config:gles",
"--gold_key", "configuration:Release",
"--gold_key", "cpu_or_gpu_value:QuadroP400",
"--gold_key", "model:Golo",

View File

@ -45517,14 +45517,16 @@
"--webgl_version",
"2",
"--gold_key",
"browser:Chrome",
"--gold_key",
"alpha_type:Premul",
"--gold_key",
"arch:wasm",
"--gold_key",
"browser:Chrome",
"--gold_key",
"color_depth:8888",
"--gold_key",
"config:gles",
"--gold_key",
"configuration:Release",
"--gold_key",
"cpu_or_gpu_value:QuadroP400",

View File

@ -7,4 +7,5 @@ run_local:
--resources ../../resources \
--known_hashes /tmp/wasm-gmtests/empty.txt \
--output /tmp/wasm-gmtests/ \
--use_gpu --timeout 600
--use_gpu --timeout 600 \
--manual_mode

View File

@ -62,6 +62,11 @@ const opts = [
description: 'Number of seconds to allow test to run.',
type: Number,
},
{
name: 'manual_mode',
description: 'If set, tests will not run automatically.',
type: Boolean,
}
];
const usage = [
@ -175,7 +180,7 @@ app.post('/write_png', (req, res) => {
const newFile = path.join(options.output, md5 + '.png');
fs.writeFileSync(newFile, data, {
encoding: 'binary',
})
});
res.sendStatus(200);
});
@ -230,6 +235,15 @@ async function driveBrowser() {
waitUntil: 'networkidle0'
});
if (options.manual_mode) {
console.log('Manual mode detected. Will hang');
// Wait a very long time, with the web server running.
await page.waitForFunction(`window._abort_manual_mode`, {
timeout: 1000000000,
polling: 1000,
});
}
// Page is mostly loaded, wait for test harness page to report itself ready. Some resources
// may still be loading.
console.log('Waiting 30s for test harness to be ready');