Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm/per-file: Link to the exact line for tests that have the info #9

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test262/per-file/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function generateChildNode(childName, child, filepath) {
child.aggregatedResults
);
childNode.querySelector(".tree-node-github-url").href =
window.config.generateGitHubURLFromTestPath(filepath);
window.config.generateGitHubURLFromTestPath(filepath, childName);
return childNode;
}

Expand Down
6 changes: 4 additions & 2 deletions wasm/per-file/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ <h2>Per-file results</h2>
window.config = {
initialPathInTree: "Spec",
loadPathsAndModes: [["wasm/per-file-master.json", "Default"]],
generateGitHubURLFromTestPath(filepath) {
generateGitHubURLFromTestPath(filepath, testName) {
const result = /^Spec\/(.*)\.js\/[^:]*::(.*)*$/.exec(filepath);
if (!result) return "";
return `https://github.com/WebAssembly/testsuite/blob/main/${result[1]}.wast`;
const lineNumber = /\(line (\d+)\)$/.exec(testName);
const line = lineNumber ? `#L${lineNumber[1]}` : "";
return `https://github.com/WebAssembly/testsuite/blob/main/${result[1]}.wast${line}`;
},
};
</script>
Expand Down
Loading