Fix test262 for realsies

The github action was exceeding maximum allowed memory size because we were no 
longer grouping messages correctly prior to formatting them in the script. I 
think these were introduced when we integrated the Babel plugin into the 
preprocessor. This PR strips out filenames from the message so they can be 
grouped together again. Also added some light comments 

Test plan: manually ran `scripts/test262.sh` and verified that the JSON was 
grouped together correctly
This commit is contained in:
Lauren Tan
2022-12-22 13:12:08 -05:00
parent 47e20c3f66
commit 75fc20981a
@@ -15,7 +15,10 @@ module.exports = (test) => {
throw new Error("Codegen returned an empty string");
}
} catch (error) {
error.message = error.message.replace(/ \(\d+:\d+\)/, "");
// We use the `stderr` output to group errors so we can count them, so we need to dedupe errors
// that are the same but differ slightly
error.message = error.message.replace(/ \(\d+:\d+\)/, ""); // some errors report line numbers
error.message = error.message.replace(/\/.*\.js:\s/, ""); // babel seems to output filenames
test.result = {
stderr: `${error.name}: ${error.message}\n`,
stdout: "",