File tree 1 file changed +7
-4
lines changed
crates/cli/src/bin/wasm-bindgen-test-runner
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,17 @@ fn main() -> anyhow::Result<()> {
117
117
. map ( Path :: new)
118
118
. context ( "file to test is not a valid file, can't extract file name" ) ?;
119
119
120
+ let debug = env:: var ( "WASM_BINDGEN_NO_DEBUG" ) . is_err ( ) ;
121
+
120
122
// Collect all tests that the test harness is supposed to run. We assume
121
123
// that any exported function with the prefix `__wbg_test` is a test we need
122
124
// to execute.
123
125
let wasm = fs:: read ( & cli. file ) . context ( "failed to read Wasm file" ) ?;
124
- let mut wasm =
125
- walrus:: Module :: from_buffer ( & wasm) . context ( "failed to deserialize Wasm module" ) ?;
126
+ let mut wasm = walrus:: ModuleConfig :: new ( )
127
+ // generate dwarf for debug
128
+ . generate_dwarf ( debug)
129
+ . parse ( & wasm)
130
+ . context ( "failed to deserialize Wasm module" ) ?;
126
131
let mut tests = Tests :: new ( ) ;
127
132
128
133
' outer: for export in wasm. exports . iter ( ) {
@@ -233,7 +238,6 @@ fn main() -> anyhow::Result<()> {
233
238
} ;
234
239
235
240
let headless = env:: var ( "NO_HEADLESS" ) . is_err ( ) ;
236
- let debug = env:: var ( "WASM_BINDGEN_NO_DEBUG" ) . is_err ( ) ;
237
241
238
242
// Gracefully handle requests to execute only node or only web tests.
239
243
let node = matches ! ( test_mode, TestMode :: Node { .. } ) ;
@@ -306,7 +310,6 @@ fn main() -> anyhow::Result<()> {
306
310
307
311
b. debug ( debug)
308
312
. input_module ( module, wasm)
309
- . keep_debug ( false )
310
313
. emit_start ( false )
311
314
. generate ( & tmpdir)
312
315
. context ( "executing `wasm-bindgen` over the Wasm file" ) ?;
You can’t perform that action at this time.
0 commit comments