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

Test failure #708

Open
joliss opened this issue Apr 2, 2015 · 7 comments
Open

Test failure #708

joliss opened this issue Apr 2, 2015 · 7 comments
Labels
pull request wanted This is a great way to contribute! Help us out :-D testing Stuff related to testing nvm itself.

Comments

@joliss
Copy link
Contributor

joliss commented Apr 2, 2015

On master, npm run test/fast fails for me:

$ npm run test/fast

> nvm@0.24.0 test/fast /home/ubuntu/src/nvm
> shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell


Running tests in bash
Running tests at 2015-04-02T15:15:03
  test/fast
    ...
    Listing versions
    ...
    ✓ Running "nvm ls stable" and "nvm ls unstable" should return the appropriate implicit alias
    ✗ Running "nvm ls system" should include "system" when appropriate
"nvm ls system" contained "system" when system node is not present
    ✓ Running "nvm ls" should display all installed versions.
    ✓ Running "nvm ls" should filter out ".nvm"
    ✓ Running "nvm ls" should filter out "versions"
    ✗ Running "nvm ls" should include "system" when appropriate
"nvm ls" contained "system" when system node is not present
    ✓ Running "nvm ls" should list versions in the "versions" directory
  ...
  ✓ Running "nvm use iojs" uses latest io.js version
  ✗ Running "nvm use system" should work as expected
Did not report error, system node not found
  ✓ Running "nvm use x" should create and change the "current" symlink
  ...


Done, took 42 seconds.
69 tests passed.
3 tests failed.
make: *** [test-bash] Error 3

npm ERR! Linux 3.13.0-48-generic
npm ERR! argv "/home/ubuntu/.nvm/versions/io.js/v1.6.3/bin/iojs" "/home/ubuntu/.nvm/versions/io.js/v1.6.3/bin/npm" "run" "test/fast"
npm ERR! node v1.6.3
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! nvm@0.24.0 test/fast: `shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nvm@0.24.0 test/fast script 'shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell'.
npm ERR! This is most likely a problem with the nvm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell
npm ERR! You can get their info via:
npm ERR!     npm owner ls nvm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/src/nvm/npm-debug.log

I do have a system Node at /usr/bin/nodejs [sic], but no system-wide node (without js suffix); running Ubuntu 14.04.2.

@ljharb
Copy link
Member

ljharb commented Apr 2, 2015

What's your $NVM_DIR? I suspect tests only work when run from the actual installed NVM_DIR location.

@ljharb ljharb added the testing Stuff related to testing nvm itself. label Apr 3, 2015
@joliss
Copy link
Contributor Author

joliss commented Apr 3, 2015

Yes, my NVM_DIR is ~/.nvm, but this is a separate clone. When I ran it the test suite in ~/.nvm, it messed up my installed Node versions (think they got moved into bak), so I didn't want to do that again. ;-)

@ljharb
Copy link
Member

ljharb commented Apr 5, 2015

@joliss I think I figured out these failures in 82393f5 - can you verify again?

@joliss
Copy link
Contributor Author

joliss commented Apr 6, 2015

No, still same three errors (in separate clone). Is there a way I can provide more detailed debug info?

@joliss
Copy link
Contributor Author

joliss commented Apr 6, 2015

Adding these 2 debug statements ...

diff --git "a/test/fast/Listing versions/Running \"nvm ls system\" should include \"system\" when appropriate" "b/test/fast/Listing versions/Running \"nvm ls system\" should include \"system\" when appropriate"
index f1e5ef6..24a3a79 100755
--- "a/test/fast/Listing versions/Running \"nvm ls system\" should include \"system\" when appropriate"
+++ "b/test/fast/Listing versions/Running \"nvm ls system\" should include \"system\" when appropriate"
@@ -12,10 +12,12 @@ mkdir -p ../../../v0.3.3
 mkdir -p ../../../v0.3.9

 nvm_has_system_node() { return 0; }
+nvm ls system >&2
 nvm ls system | grep system 2>&1 > /dev/null
 [ $? -eq 0 ] || die '"nvm ls system" did not contain "system" when system node is present'

 nvm_has_system_node() { return 1; }
+nvm ls system >&2
 nvm ls system | grep system 2>&1 > /dev/null
 [ $? -ne 0 ] || die '"nvm ls system" contained "system" when system node is not present'

... I get ...

->       system
->       system

@joliss
Copy link
Contributor Author

joliss commented Apr 6, 2015

With my regular nvm (outside the test suite, on master), I get

$ nvm ls system
            N/A

@ljharb
Copy link
Member

ljharb commented Apr 6, 2015

Thanks, I'll keep looking :-)

@ljharb ljharb added the pull request wanted This is a great way to contribute! Help us out :-D label Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull request wanted This is a great way to contribute! Help us out :-D testing Stuff related to testing nvm itself.
Projects
None yet
Development

No branches or pull requests

2 participants