Skip to content
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
10 changes: 10 additions & 0 deletions src/test/unit/special-paths.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ describe('parseFileNameFromSymbolication', function () {
path: 'core/fdrm/fx_crypt.cpp',
rev: 'dab1161c861cc239e48a17e1a5d729aa12785a53',
});
expect(
parseFileNameFromSymbolication(
'git:github.com/torvalds/linux:arch/x86/mm/fault.c:v5.15'
)
).toEqual({
type: 'git',
repo: 'github.com/torvalds/linux',
path: 'arch/x86/mm/fault.c',
rev: 'v5.15',
});
});

it('parses s3 paths', function () {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/special-paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export type SourceFileDownloadRecipe =
// Some rust stdlib functions: (https://bugzilla.mozilla.org/show_bug.cgi?id=1717973)
// "/builds/worker/fetches/rustc/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs"
const repoPathRegex =
/^(?<vcs>hg|git):(?<repo>[^:]*):(?<path>[^:]*):(?<rev>[0-9a-f]*)$/;
/^(?<vcs>hg|git):(?<repo>[^:]*):(?<path>[^:]*):(?<rev>.*)$/;
const s3PathRegex =
/^s3:(?<bucket>[^:]*):(?<digest>[0-9a-f]*)\/(?<path>[^:]*):$/;
const cargoPathRegex =
Expand Down