@samitouri / QOS-React-2 / commits / 75fc20981a

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

Lauren Tan committed Dec 22, 2022 at 13:12 UTC 75fc20981a2cf300c15c888c94ada62c7e80e2ce
1 file changed +4 -1
compiler/forget/scripts/test262-preprocessor.js
+4 -1
@@ -15,7 +15,10 @@ module.exports = (test) => {
15 throw new Error("Codegen returned an empty string");
16 }
17 } catch (error) {
18 - error.message = error.message.replace(/ \(\d+:\d+\)/, "");
18 + // We use the `stderr` output to group errors so we can count them, so we need to dedupe errors
19 + // that are the same but differ slightly
20 + error.message = error.message.replace(/ \(\d+:\d+\)/, ""); // some errors report line numbers
21 + error.message = error.message.replace(/\/.*\.js:\s/, ""); // babel seems to output filenames
22 test.result = {
23 stderr: `${error.name}: ${error.message}\n`,
24 stdout: "",