Add flags (--printSource, --saveCompiledTests) to more easily extract the runnable sources for a hostType
dilijev opened this issue · 1 comments
This would vastly improve inner loop for investigating and debugging test262 test regressions (especially in the context of the actual test262 test instead of a mockup expression or imitation test).
Something like: test262-harness --hostType ch --printSource test-file > source.js
Where the contents of source.js
are then as would be as if
test262-harness --hostType ch --hostPath c:\path\to\ch.exe test-file-or-glob -r json > run.json
jq ".[0].contents" run.json > sourceString.js
# edit sourceString.js to do console.log(<string>)
node sourceString.js > source.js
And/or a flag to save the files to disk:
test262-harness --hostType ch --saveCompiledTests test-file-or-glob
(--hostPath
not required, in which case the tests will not be run)
For each test test.js
that would have been run by that glob, a file test.<hostType>.js
is saved to disk next to test.js
(e.g. test/dir/abc.js
for --hostType ch
results in test/dir/abc.ch.js
)
I'm working on this.