Skip to content

Commit

Permalink
Enable Backtrace for cargo test
Browse files Browse the repository at this point in the history
* sets env var `$RUST_BACKTRACE=1`
* matches references to local files in the backtrace

NOTE: This could be further improved by making this configurable. I'll leave that to someone more experienced with atom packages. ;-)
  • Loading branch information
colin-kiegel committed Oct 30, 2015
1 parent 3a57deb commit b8bc438
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/cargo.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ function provideBuilder() {
name: 'Cargo: test',
exec: cargoPath,
args: [ 'test' ],
env: { RUST_BACKTRACE: '1' },
sh: false,
errorMatch: [
'(?<file>.+.rs):(?<line>\\d+):(?<col>\\d+):',
'at (?<file>[^.\/][^\\/][^\\:]+):(?<line>\\d+)',
'thread \'[^\\\']+\' panicked at \'[^\\\']+\', (?<file>[^\\/][^\\:]+):(?<line>\\d+)'
]
},
Expand Down

0 comments on commit b8bc438

Please sign in to comment.