mirror-webgpu-cts/tools/validate
Kai Ninomiya db412d7f76
Factor out and dedup 'validate' step of presubmit (#2608)
Prior to this, the gen_listings script actually did a lot of bonus work
on top of generating listings: it validated a bunch of things about test
files and tests. However this is (1) misleading and (2) called twice
during the build process, once for standalone and once for wpt.

This change splits validation out into a separate script, and also runs
both gen_listings and validate only once instead of twice.

On my machine, gen_listings takes 0.75 seconds without validation, but
validation adds about 16s. So now, even though crawling happens twice
(2 originally, minus 1 by deduplicating, plus 1 in the validate tool)
this shaves that off the presubmit time: before: 143s, after: 129s.
OK, so it's still really slow, but it's better.

Also, removes the quiet-grunt setup that made this really hard to see
due to quieting all of the build steps. It was added because development
required constant command-line builds, but now that we have the dev
server I don't think anyone is doing this anymore.

Also also, fixes a bug in gen_version which was preventing it from
running without an existing standalone build.
2023-05-12 22:44:52 -07:00

6 lines
186 B
JavaScript
Executable file

#!/usr/bin/env node
// Validate several properties of test files and the tests in them.
require('../src/common/tools/setup-ts-in-node.js');
require('../src/common/tools/validate.ts');