Skip to content

Commit

Permalink
test262/fails: initial add
Browse files Browse the repository at this point in the history
  • Loading branch information
CanadaHonk committed Jan 8, 2025
1 parent 2da00e2 commit 3bcc8f6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "porffor",
"description": "a basic experimental wip aot optimizing js -> wasm engine/compiler/runtime in js",
"version": "0.55.14",
"version": "0.55.15",
"author": "CanadaHonk",
"license": "MIT",
"scripts": {},
Expand Down
2 changes: 1 addition & 1 deletion runner/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import fs from 'node:fs';
globalThis.version = '0.55.14';
globalThis.version = '0.55.15';

// deno compat
if (typeof process === 'undefined' && typeof Deno !== 'undefined') {
Expand Down
34 changes: 34 additions & 0 deletions test262/fails.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const fs = require('fs');
const all = [];
const tree = x => {
for (const y of fs.readdirSync(x)) {
if (y.endsWith('.js')) {
all.push((x + '/' + y).slice(21));
} else {
try {
tree(x + '/' + y);
} catch {}
}
}
};
tree('test262/test262/test');

const { passes } = require('./results.json');
const fails = all.filter(x => !passes.includes(x));
{
const dirs = Object.groupBy(fails, x => x.split('/').slice(0, 2).join('/'));
const top = Object.keys(dirs).sort((a, b) => dirs[b].length - dirs[a].length);
console.log(top.slice(0, 40).map(x => `${x}: ${dirs[x].length} (${((dirs[x].length / all.length) * 100).toFixed(2)}%)`).join('\n'));
}
console.log()
{
const dirs = Object.groupBy(fails, x => x.split('/').slice(0, 3).join('/'));
const top = Object.keys(dirs).sort((a, b) => dirs[b].length - dirs[a].length);
console.log(top.slice(0, 40).map(x => `${x}: ${dirs[x].length} (${((dirs[x].length / all.length) * 100).toFixed(2)}%)`).join('\n'));
}
console.log()
{
const dirs = Object.groupBy(fails, x => x.split('/').slice(0, 4).join('/'));
const top = Object.keys(dirs).sort((a, b) => dirs[b].length - dirs[a].length);
console.log(top.slice(0, 40).map(x => `${x}: ${dirs[x].length} (${((dirs[x].length / all.length) * 100).toFixed(2)}%)`).join('\n'));
}

0 comments on commit 3bcc8f6

Please sign in to comment.