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

non-headless tests missing url #419

Closed
smasher816 opened this issue Oct 24, 2018 · 5 comments
Closed

non-headless tests missing url #419

smasher816 opened this issue Oct 24, 2018 · 5 comments
Labels
bug Something isn't working logging wasm-pack test
Milestone

Comments

@smasher816
Copy link

🐛 Bug description

when running wasm-pack test --firefox I receive the following output

  
  [1/7] Checking `rustc` version...
  [2/7] Checking crate configuration...
  [3/7] Adding WASM target...
  info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
  [4/7] Compiling tests to WASM...
      Finished dev [unoptimized + debuginfo] target(s) in 0.05s
  wasm-bindgen 0.2.25
  [5/7] wasm-bindgen already installed...
  [6/7] Getting geckodriver...
  [7/7] Running tests in Firefox...
      Finished dev [unoptimized + debuginfo] target(s) in 0.06s
       Running target/wasm32-unknown-unknown/debug/deps/keycap_rs-882a5a05a48b2dd4.wasm
  no tests to run!
       Running target/wasm32-unknown-unknown/debug/deps/wasm-c9e8681418ea5a41.wasm
Int                                                 
  
  Note that interactive mode is enabled because `NO_HEADLESS`
  is specified in the environment of this process. Once you're
  done with testing you'll need to kill this server with
/ Ctrl-C.

Notice the cut off "Int " line above the NO_HEADLESS message.

🤔 Expected Behavior

When running NO_HEADLESS=1 cargo test --target wasm32-unknown-unknown (with the wasm-bindgen-test-runner in .cargo/config) I see the expected URL line


Finished dev [unoptimized + debuginfo] target(s) in 0.06s                                                                                                 
     Running target/wasm32-unknown-unknown/debug/deps/keycap_rs-882a5a05a48b2dd4.wasm
no tests to run!
     Running target/wasm32-unknown-unknown/debug/deps/wasm-c9e8681418ea5a41.wasm
Interactive browsers tests are now available at http://127.0.0.1:8000

Note that interactive mode is enabled because `NO_HEADLESS`
is specified in the environment of this process. Once you're
done with testing you'll need to kill this server with
Ctrl-C.

Notice the "are now available at ..." line present

👟 Steps to reproduce

Run wasm-pack test without --headless

🌍 Your environment

wasm-pack version: 0.5.1
wasm-bindgen-test: 0.2.25
rustc version: 1.31.0-nightly (424a749a0 2018-10-21)

@smasher816 smasher816 changed the title test missing Interactive url non-headless tests missing url Oct 24, 2018
@fitzgen fitzgen added bug Something isn't working logging wasm-pack test labels Oct 25, 2018
@fitzgen
Copy link
Member

fitzgen commented Oct 25, 2018

Thanks for filing a bug report!

@alexcrichton do you think this is related to how wasm-bindgen-test is using carriage returns? Is it doing so unconditionally, without checking whether stdout is a tty?

@alexcrichton
Copy link
Contributor

It's true that wasm-bindgen-test doesn't check for a TTY and that it prints \r unconditionally, but that in theory shouldn't matter as all shells/output streams should handle \r (at least from what I've seen).

I'm not really sure what's going on here, @smasher816 is the output you gisted above the exact output from wasm-pack? It has a number of oddities like:

  • What this issue is about, the stray "Int" ...
  • The "Note .." message and following lines are indented by two spaces
  • The final "Ctrl-C" is preceeded by "/ "

Is this perhaps something like interleaving with indicatif causing problems?

@smasher816
Copy link
Author

The output was copied directly out of my terminal, ant the "/" preceding Ctrl-C is part of a spinner (assumedly from indicatif).

It does look like a possible interleaving issue as running the test again today is producing a different but still truncated line Interactive browsers tests are now available at http:/

@ashleygwilliams
Copy link
Member

for what it's worth, in my attempt to repro this, i do not see a cut off line at all, i just see nothing:

Ashleys-MacBook-Pro-2:percy ag_dubs$ wasm-pack test crates/virtual-dom-rs --firefox

  [1/6] 🦀  Checking `rustc` version...
  [2/6] 🎯  Adding WASM target...
  info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
  [3/6] 🌀  Compiling tests to WASM...
      Finished dev [unoptimized + debuginfo] target(s) in 0.32s
  [4/6] ⬇️  Installing wasm-bindgen...
  [5/6] Getting geckodriver...
  [6/6] Running tests in Firefox...
      Finished dev [unoptimized + debuginfo] target(s) in 0.25s
       Running /Users/ag_dubs/rust/percy/target/wasm32-unknown-unknown/debug/deps/virtual_dom_rs-9e58ab35df2eb75a.wasm
  no tests to run!
       Running /Users/ag_dubs/rust/percy/target/wasm32-unknown-unknown/debug/deps/create_element-c363d3307c12c5d1.wasm
Executing bindgen...

  Note that interactive mode is enabled because `NO_HEADLESS`
  is specified in the environment of this process. Once you're
  done with testing you'll need to kill this server with
/ Ctrl-C.
^C

@ashleygwilliams
Copy link
Member

this should be solved by #547 - it will be released today in 0.7.0. if you are still seeing the issue please reopen or file a new issue! thanks for the repo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working logging wasm-pack test
Projects
None yet
Development

No branches or pull requests

4 participants