Split rwc input files#18772
Conversation
sandersn
left a comment
There was a problem hiding this comment.
Looks good, although I want to wait on merging it until somebody has a chance to make sure it works on Linux.
| gulp.task("tsc-instrumented", "Builds an instrumented tsc.js", ["local", loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => { | ||
| exec(host, [instrumenterJsPath, "record", "iocapture", builtLocalCompiler], done, done); | ||
| gulp.task("tsc-instrumented", "Builds an instrumented tsc.js - run with --test=[testname]", ["local", loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => { | ||
| const test = cmdLineOptions["tests"] || "iocapture"; |
There was a problem hiding this comment.
or ... maybe gulp allows all prefixes?
There was a problem hiding this comment.
In gulp, "tests", "test", and "t" are all aliased to "tests" using the opt parsing library we use.
| for (let {done, value} = gen.next(); !done; { done, value } = gen.next()) { | ||
| const [name, content, count] = value as [string, string, number | undefined]; | ||
| if (count === 0) continue; // Allow error reporter to skip writing files without errors | ||
| const relativeFileName = relativeFileBase + (ts.startsWith(name, "/") ? "" : "/") + name + extension; |
There was a problem hiding this comment.
Do we now call sanitizeTestFilePath on relativeFileName somewhere?
There was a problem hiding this comment.
We did before - the paths given to this function are always sanitized. What was changed was stripping the leading slash during sanitization, rather than here.
| wrapper.startReplayFromData(JSON.parse(logString)); | ||
| }; | ||
| wrapper.startReplayFromData = log => { | ||
| wrapper.startReplayFromData = (log) => { |
There was a problem hiding this comment.
I can remove them, I experimented with some other modifications which added a parameter, but neglected to remove the parenthesis when I undid it.
sandersn
left a comment
There was a problem hiding this comment.
Sounds like you got a successful Linux run!
The last stage of the internal RWC format revision (prior to any rewrites for public consumption), this splits our RWC test definitions into a tree of files and a test definition json file. There is a linked internal PR with updated test definitions.
For anyone not familiar with this effort: this change should both make it much easier for us to audit changes to RWC tests when we recapture them (as we can review individual units of code), and also allows us to inspect the project structure on disk with our usual tools without a separate extraction step (though some projects may require extra local configuration to be navigable if they, for example, read their test settings from a response file) when debugging issues found by RWC tests.