Yew: supports_svg-test fails

Created on 30 Dec 2019  路  5Comments  路  Source: yewstack/yew

Problem
When I run cargo test,
it fails for me because of the supports_svg-test:

dyld: lazy symbol binding failed: Symbol not found: _emscripten_asm_const_int
  Referenced from: /Users/tgotwig/github/rust/yew/target/debug/deps/vtag_test-7e8ef54d0d16a8ec
  Expected in: flat namespace

dyld: Symbol not found: _emscripten_asm_const_int
  Referenced from: /Users/tgotwig/github/rust/yew/target/debug/deps/vtag_test-7e8ef54d0d16a8ec
  Expected in: flat namespace

Steps To Reproduce
Run cargo test supports_svg

Expected behavior
No error 馃檪

Environment:

  • Yew version: v0.10, master
  • Rust version: 1.40.0
  • OS: macos
bug

Most helpful comment

Yeah so annoying! I ran into this too recently. It's just a limitation of the wasm bindgen test runner for now

All 5 comments

@TGotwig which target are you using? Try running:

cargo test --features wasm_test --target wasm32-unknown-unknown

@jstarry running that command gives me the following error:

error: could not execute process `wasm-bindgen-test-runner /Users/tgotwig/github/rust/yew/target/wasm32-unknown-unknown/debug/deps/yew-19d9c726b53e8295.wasm` (never executed)

Caused by:
  No such file or directory (os error 2)

Currently I have the following block in .cargo/config:

[target.x86_64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]

I think it would be good if I could pass tests without modifying that file, but how 馃

@TGotwig those should fine, try following the steps here: https://github.com/yewstack/yew#running-tests

@jstarry Now it works 馃槉
Currently I try to run a specific test together with --nocapture but something goes wrong:

cargo test --features wasm_test --target wasm32-unknown-unknown it_compares_tags -- --nocapture

It gives me:

Running target/wasm32-unknown-unknown/debug/deps/format_test-cab6ce5b6f3c1509.wasm
panicked at 'flag --nocapture not supported', /Users/tgotwig/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-test-0.3.5/src/rt/mod.rs:245:17

Stack:

Error
    at module.exports.__wbg_new_59cb74e423758ede (/Users/tgotwig/github/rust/yew/target/wasm32-unknown-unknown/wbg-tmp/wasm-bindgen-test.js:695:19)
    at console_error_panic_hook::Error::new::hbd56d82794be256d (wasm-function[3362]:0xfefd6)
    at console_error_panic_hook::hook_impl::hcd48a6126db12440 (wasm-function[603]:0x925bd)
    at console_error_panic_hook::hook::h0f2e51960df07163 (wasm-function[3708]:0x10435f)
    at core::ops::function::Fn::call::hb261e0bf5166a94c (wasm-function[3374]:0xff33d)
    at std::panicking::rust_panic_with_hook::hdf14da40c6b51ea2 (wasm-function[1029]:0xb446c)
    at std::panicking::continue_panic_fmt::hf8630aaa243736ee (wasm-function[2247]:0xe7784)
    at std::panicking::begin_panic_fmt::h7e7feea1f174f7c3 (wasm-function[3344]:0xfeb0b)
    at wasm_bindgen_test::__rt::Context::args::hf85eb645a12ca6d6 (wasm-function[140]:0x4dff6)
    at wasmbindgentestcontext_args (wasm-function[961]:0xafa65)


RuntimeError: unreachable
    at __rust_start_panic (wasm-function[4491]:0x10b446)
    at rust_panic (wasm-function[4063]:0x108a75)
    at std::panicking::rust_panic_with_hook::hdf14da40c6b51ea2 (wasm-function[1029]:0xb4493)
    at std::panicking::continue_panic_fmt::hf8630aaa243736ee (wasm-function[2247]:0xe7784)
    at std::panicking::begin_panic_fmt::h7e7feea1f174f7c3 (wasm-function[3344]:0xfeb0b)
    at wasm_bindgen_test::__rt::Context::args::hf85eb645a12ca6d6 (wasm-function[140]:0x4dff6)
    at wasmbindgentestcontext_args (wasm-function[961]:0xafa65)
    at WasmBindgenTestContext.args (/Users/tgotwig/github/rust/yew/target/wasm32-unknown-unknown/wbg-tmp/wasm-bindgen-test.js:336:14)
    at main (/Users/tgotwig/github/rust/yew/target/wasm32-unknown-unknown/wbg-tmp/run.js:43:16)
    at Object.<anonymous> (/Users/tgotwig/github/rust/yew/target/wasm32-unknown-unknown/wbg-tmp/run.js:53:9)
error: test failed, to rerun pass '--test format_test'

Why is this not supported? 馃

Yeah so annoying! I ran into this too recently. It's just a limitation of the wasm bindgen test runner for now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

djahandarie picture djahandarie  路  3Comments

kellytk picture kellytk  路  3Comments

kellytk picture kellytk  路  4Comments

alun picture alun  路  4Comments

agausmann picture agausmann  路  3Comments