fix a few failing gm tests in wasm
The skia gn/ninja build step and the emscripten build step were using a different set of defines. this violated assumptions of a couple of tests Change-Id: Id5364c0e1281b2e4024685fe8f106ee55c4961cb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338343 Commit-Queue: Nathaniel Nifong <nifong@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
ae562bd177
commit
50940aba5d
@ -202,7 +202,7 @@ func runTests(ctx context.Context, builtPath, nodeBinPath, resourcePath, testHar
|
||||
"--use_gpu", // TODO(kjlubick) use webglVersion and account for CPU
|
||||
"--output", workPath,
|
||||
"--resources", resourcePath,
|
||||
"--timeout", "180", // 180 seconds per batch of 50 tests.
|
||||
"--timeout", "180", // seconds per batch of 50 tests.
|
||||
}
|
||||
|
||||
_, err := exec.RunCwd(ctx, testHarnessPath, args...)
|
||||
|
@ -146,6 +146,24 @@ ${NINJA} -C ${BUILD_DIR} libskia.a libskshaper.a \
|
||||
|
||||
echo "Generating final wasm"
|
||||
|
||||
# Defines for the emscripten compilation step, which builds the tests
|
||||
# Aim to match the defines that would be set by gn for the skia compilation step.
|
||||
SKIA_DEFINES="
|
||||
-DSK_DISABLE_AAA \
|
||||
-DSK_FORCE_8_BYTE_ALIGNMENT \
|
||||
-DGR_OP_ALLOCATE_USE_NEW \
|
||||
-DSK_HAS_WUFFS_LIBRARY \
|
||||
-DSK_HAS_HEIF_LIBRARY \
|
||||
-DSK_ENCODE_WEBP \
|
||||
-DSK_CODEC_DECODES_WEBP \
|
||||
-DSK_ENCODE_PNG \
|
||||
-DSK_CODEC_DECODES_PNG \
|
||||
-DSK_ENCODE_JPEG \
|
||||
-DSK_CODEC_DECODES_JPEG \
|
||||
-DSK_SHAPER_HARFBUZZ_AVAILABLE \
|
||||
-DSK_UNICODE_AVAILABLE \
|
||||
-DSK_ENABLE_SVG"
|
||||
|
||||
# Disable '-s STRICT=1' outside of Linux until
|
||||
# https://github.com/emscripten-core/emscripten/issues/12118 is resovled.
|
||||
STRICTNESS="-s STRICT=1"
|
||||
@ -197,9 +215,8 @@ GLOBIGNORE+="tests/GrThreadSafeCacheTest.cpp"
|
||||
EMCC_DEBUG=1 ${EMCXX} \
|
||||
$RELEASE_CONF \
|
||||
-I. \
|
||||
-DSK_DISABLE_AAA \
|
||||
-DSK_FORCE_8_BYTE_ALIGNMENT \
|
||||
-DGR_TEST_UTILS \
|
||||
$SKIA_DEFINES \
|
||||
$WASM_GPU \
|
||||
-std=c++17 \
|
||||
--profiling-funcs \
|
||||
|
@ -19,5 +19,5 @@ run_local:
|
||||
--resources ../../resources \
|
||||
--known_hashes /tmp/wasm-gmtests/empty.txt \
|
||||
--output /tmp/wasm-gmtests/ \
|
||||
--use_gpu --timeout 600 \
|
||||
--use_gpu --timeout 220 \
|
||||
--manual_mode
|
||||
|
@ -60,6 +60,7 @@ array of the test names and what they drew.
|
||||
window._failed = [];
|
||||
await RunTests(GM);
|
||||
if (window._error) {
|
||||
console.log(window._error);
|
||||
return;
|
||||
}
|
||||
await RunGMs(GM);
|
||||
@ -74,6 +75,7 @@ array of the test names and what they drew.
|
||||
|
||||
const statusElement = document.getElementById('status_text');
|
||||
function log(line) {
|
||||
console.log(line);
|
||||
line += '\n';
|
||||
statusElement.innerText += line;
|
||||
window._log += line;
|
||||
@ -317,22 +319,24 @@ array of the test names and what they drew.
|
||||
'ZeroSizedProxyTest',
|
||||
'skbug5221_GPU',
|
||||
|
||||
// These tests are failing
|
||||
// These tests are failing because they can't make an SkSurface
|
||||
'ApplyGamma',
|
||||
'BlurMaskBiggerThanDest',
|
||||
'Codec_GifPreMap',
|
||||
'Codec_AnimatedTransparentGif',
|
||||
'FILEStreamWithOffset',
|
||||
'Gif',
|
||||
'RepeatedClippedBlurTest',
|
||||
'SkTraceMemoryDump_ownedGLRenderTarget',
|
||||
'SurfaceClear_Gpu',
|
||||
'SurfaceSnapshotAlphaType_Gpu',
|
||||
'TestGpuAllContexts',
|
||||
'TestGpuRenderingContexts',
|
||||
'TestMockContext',
|
||||
'TextBlobAbnormal',
|
||||
'TextBlobCache'
|
||||
'TextBlobCache',
|
||||
|
||||
// These tests time out
|
||||
'SkTraceMemoryDump_ownedGLRenderTarget',
|
||||
|
||||
// These tests are failing for unknown reasons
|
||||
'FILEStreamWithOffset',
|
||||
|
||||
]);
|
||||
|
||||
async function RunTests(GM) {
|
||||
|
@ -66,6 +66,12 @@ const opts = [
|
||||
name: 'manual_mode',
|
||||
description: 'If set, tests will not run automatically.',
|
||||
type: Boolean,
|
||||
},
|
||||
{
|
||||
name: 'batch_size',
|
||||
description: 'Number of gms (or unit tests) to run in a batch. The main thread ' +
|
||||
'of the page is only unlocked between batches. Default: 50. Use 1 for debugging.',
|
||||
type: Number,
|
||||
}
|
||||
];
|
||||
|
||||
@ -89,6 +95,9 @@ if (!options.port) {
|
||||
if (!options.timeout) {
|
||||
options.timeout = 60;
|
||||
}
|
||||
if (!options.batch_size) {
|
||||
options.batch_size = 50;
|
||||
}
|
||||
|
||||
if (options.help) {
|
||||
console.log(commandLineUsage(usage));
|
||||
@ -263,10 +272,9 @@ async function driveBrowser() {
|
||||
await page.click('#start_tests');
|
||||
|
||||
// Rather than wait a long time for things to finish, we send progress updates every 50 tests.
|
||||
const batchSize = 50;
|
||||
let batch = batchSize;
|
||||
let batch = options.batch_size;
|
||||
while (true) {
|
||||
console.log(`Waiting ${options.timeout}s for ${batchSize} tests to complete`);
|
||||
console.log(`Waiting ${options.timeout}s for ${options.batch_size} tests to complete`);
|
||||
await page.waitForFunction(`(window._testsProgress >= ${batch}) || window._testsDone || window._error`, {
|
||||
timeout: options.timeout*1000,
|
||||
});
|
||||
@ -288,7 +296,7 @@ async function driveBrowser() {
|
||||
break;
|
||||
}
|
||||
console.log(`In Progress; completed ${progress.count} tests.`)
|
||||
batch = progress.count + batchSize;
|
||||
batch = progress.count + options.batch_size;
|
||||
}
|
||||
const goldResults = await page.evaluate('window._results');
|
||||
failed = await(page.evaluate('window._failed'));
|
||||
|
Loading…
Reference in New Issue
Block a user