Cannot run tests since 2389525a1 #3948

Closed
domenic opened this Issue Sep 28, 2013 · 18 comments

Comments

Projects
None yet
4 participants
Member

domenic commented Sep 28, 2013

Since 2389525 I have been unable to run the tests. It always fails with an error of the form:

$ npm test

> npm@1.3.11 test C:\Users\Domenic\Dropbox\Programming\GitHub\npm
> node ./test/run.js && tap test/tap/*.js

# testing in C:\Users\Domenic\AppData\Local\Temp\npm-test-3872
# global prefix = C:\Users\Domenic\AppData\Local\Temp\npm-test-3872\root

+node "C:\Users\Domenic\Dropbox\Programming\GitHub\npm\bin\npm-cli.js" install "C:\Users\Domenic\Dropbox\Programming\GitHub\npm"
 1> > npm@1.3.11 prepublish C:\Users\Domenic\Dropbox\Programming\GitHub\npm
 1> > node bin/npm-cli.js prune ; rm -rf test/*/*/node_modules ; make -j4 doc
 2> npm ERR! Error: ENOENT, open 'C:\Users\Domenic\AppData\Local\Temp\npm-test-3872\root\package.json'
 2> npm ERR! If you need help, you may report this log at:
 2> npm ERR!     <http://github.com/isaacs/npm/issues>
 2> npm ERR! or email it to:
 2> npm ERR!     <npm-@googlegroups.com>
 2>
 2> npm ERR! System Windows_NT 6.2.9200
 2> npm ERR! command "node" "C:\\Users\\Domenic\\Dropbox\\Programming\\GitHub\\npm\\bin\\npm-cli.js" "prune" ";" "rm" "-rf" "test/*/*/node_modules" ";" "make" "-j4" "doc"
 2> npm ERR! cwd C:\Users\Domenic\Dropbox\Programming\GitHub\npm
 2> npm ERR! node -v v0.10.19
 2> npm ERR! npm -v 1.3.11
 2> npm ERR! path C:\Users\Domenic\AppData\Local\Temp\npm-test-3872\root\package.json
 2> npm ERR! code ENOENT
 2> npm ERR! errno 34
 2> npm ERR! addLocalDirectory Could not pack "C:\\Users\\Domenic\\Dropbox\\Programming\\GitHub\\npm" to "C:\\Users\\Domenic\\AppData\\Local\\Temp\\npm-6776-u207NAqv\\1380335366318-0.4033868738915771\
\tmp.tgz"
 2> npm ERR! addLocal Could not install C:\Users\Domenic\Dropbox\Programming\GitHub\npm
 2> npm ERR! weird error 34

Reverting that commit fixes the issue.

This is blocking me from merging any new patches. (I am not sure how I was able to merge patches for a few commits after the one in question; possibly a cache thing?)

Member

robertkowalski commented Sep 29, 2013

@domenic can confirm that (OSX), see isaacs#3909

Member

robertkowalski commented Oct 1, 2013

but my error looks slightly different, but also happens when npm tries to install npm:

(21:54:59) [robert@tequila-osx] ~/npm (master) $ npm test

> npm@1.3.11 test /Users/robert/npm
> node ./test/run.js && tap test/tap/*.js

# testing in /var/folders/mm/8hsp08pd3133564vw7n1yvf80000gn/T/npm-test-5695
# global prefix = /var/folders/mm/8hsp08pd3133564vw7n1yvf80000gn/T/npm-test-5695/root

+node "/Users/robert/npm/bin/npm-cli.js" install "/Users/robert/npm"
 1> > npm@1.3.11 prepublish /Users/robert/npm
 1> > node bin/npm-cli.js prune ; rm -rf test/*/*/node_modules ; make -j4 doc
 1>
 1> make: Nothing to be done for `doc'.
 1> /var/folders/mm/8hsp08pd3133564vw7n1yvf80000gn/T/npm-test-5695/root/bin/npm -> /var/folders/mm/8hsp08pd3133564vw7n1yvf80000gn/T/npm-test-5695/root/lib/node_modules/npm/bin/npm-cli.js
 1> npm@1.3.11 /var/folders/mm/8hsp08pd3133564vw7n1yvf80000gn/T/npm-test-5695/root/lib/node_modules/npm
 2> npm ERR! Error: ENOENT, open '/var/folders/mm/8hsp08pd3133564vw7n1yvf80000gn/T/npm-test-5695/root/lib/package.json'
 2> npm ERR! If you need help, you may report this log at:
 2> npm ERR!     <http://github.com/isaacs/npm/issues>
 2> npm ERR! or email it to:
 2> npm ERR!     <npm-@googlegroups.com>
 2>
 2> npm ERR! System Darwin 12.5.0
 2> npm ERR! command "node" "/Users/robert/npm/bin/npm-cli.js" "prune"
 2> npm ERR! cwd /Users/robert/npm
 2> npm ERR! node -v v0.10.20
 2> npm ERR! npm -v 1.3.11
 2> npm ERR! path /var/folders/mm/8hsp08pd3133564vw7n1yvf80000gn/T/npm-test-5695/root/lib/package.json
 2> npm ERR! code ENOENT
 2> npm ERR! errno 34
 2> npm ERR!
 2> npm ERR! Additional logging details can be found in:
 2> npm ERR!     /Users/robert/npm/npm-debug.log
 2> npm ERR! not ok code 0
 2> npm WARN package.json github-url-from-git@1.1.1 No repository field.
 2>
ok 1 node "/Users/robert/npm/bin/npm-cli.js" install "/Users/robert/npm"
Member

robertkowalski commented Oct 10, 2013

@domenic @luk- works for me now.

Contributor

luk- commented Oct 10, 2013

@robertkowalski on master or on dave's branch?

Member

robertkowalski commented Oct 10, 2013

master!

Contributor

luk- commented Oct 10, 2013

publish-config is failing for me, would love to hear from more people that it's just me

Member

domenic commented Oct 10, 2013

publish-config has never worked for me, I assumed it was something wrong with my setup and that publish-config was especially fragile because it was about publishing.

Re-testing with npm test gives me failures on outdated-new-versions (found: 1.5.1, wanted: 2.27.0) and prepublish (FOUND: .\n> echo ok\n\nok\r\nnpm-test-prepubli, WANTED: .\n> echo ok\n\nok\nnpm-test-prepublish) and publish-config (time out).

Member

domenic commented Oct 10, 2013

With @davglass's branch outdated-new-versions is fixed but ignore-shrinkwrap starts failing with "first argument must be a string or Buffer".

Contributor

luk- commented Oct 10, 2013

I'll finally have time to dive into this tomorrow. Would love to get this on Travis as well.

Contributor

davglass commented Oct 10, 2013

Yes, we really need these tests working again :)

I just pulled my branch on my Chromebook and ran them and they all pass there :(

Member

robertkowalski commented Oct 11, 2013

@domenic, yes the outdated-new-versions test gets fixed by: isaacs#3924 - it was merged before I could finish the changes/errors completely that we checked on jsconf.eu

Member

robertkowalski commented Oct 11, 2013

@domenic having the same issue with the branch from @davglass

Contributor

luk- commented Oct 11, 2013

@domenic I see what the issue with publish-config is now, going to fix it up and test on Windows.

Contributor

luk- commented Oct 11, 2013

I don't think this requires any code change actually, which would be lovely.

Member

robertkowalski commented Oct 12, 2013

@luk- @domenic how do we continue here?

Member

robertkowalski commented Oct 12, 2013

my proposal: as this issue (Cannot run tests since 2389525) is fixed now, we can merge #3924 which fixes the flaky outdated-new-versions-test and everything is nice again?

Member

robertkowalski commented Oct 15, 2013

sorry for my last comment, i missed the other failing test on windows.

let's have a look:

not ok test/tap/prepublish.js ........................... 3/4
    Command: "node" "prepublish.js"
    TAP version 13
    ok 1 setup done
    not ok 2 should be equal
      ---
        file:   events.js
        line:   98
        column: 17
        stack:
          - getCaller (C:\Users\IEUser\npm\node_modules\tap\lib\tap-assert.js:41
8:17)
          - assert (C:\Users\IEUser\npm\node_modules\tap\lib\tap-assert.js:21:16
)
          - Function.equal (C:\Users\IEUser\npm\node_modules\tap\lib\tap-assert.
js:162:10)
          - Test._testAssert [as equal] (C:\Users\IEUser\npm\node_modules\tap\li
b\tap-test.js:87:16)
          - ChildProcess.onend (C:\Users\IEUser\npm\test\tap\prepublish.js:71:7)

          - ChildProcess.EventEmitter.emit (events.js:98:17)
          - maybeClose (child_process.js:735:16)
          - Socket.<anonymous> (child_process.js:948:11)
          - Socket.EventEmitter.emit (events.js:95:17)
          - Pipe.close (net.js:466:12)
        found:  |
          > npm-test-prepublish@1.2.5 prepublish .
          > echo ok

          ok
          npm-test-prepublish-1.2.5.tgz
        wanted: |
          > npm-test-prepublish@1.2.5 prepublish .
          > echo ok

          ok
          npm-test-prepublish-1.2.5.tgz
        diff:   |
          FOUND:   .\n> echo ok\n\nok\r\nnpm-test-prepubli
          WANTED:  .\n> echo ok\n\nok\nnpm-test-prepublish
                                      ^ (at position = 54)
      ...
    ok 3 cleaned up
    ok 4 test/tap/prepublish.js

    1..4
    # tests 4
    # pass  3
    # fail  1

not ok test/tap/publish-config.js ....................... 0/1
    Command: "node" "publish-config.js"
    TAP version 13
    not ok 1 test/tap/publish-config.js
      ---
        exit:     ~
        timedOut: true
        signal:   SIGTERM
        command:  "node" "publish-config.js"
      ...

    1..1
    # tests 1
    # fail  1

total ................................................. 26/30
          FOUND:   .\n> echo ok\n\nok\r\nnpm-test-prepubli
          WANTED:  .\n> echo ok\n\nok\nnpm-test-prepublish
                                      ^ (at position = 54)

somehow there is a newline issue, the windows newline is \r\n and we are expecting unix line-edings.

The rest of the result is the same.

I will add a commit to #3924 and it should fix both test-suite issues.

robertkowalski added a commit to robertkowalski/npm that referenced this issue Oct 16, 2013

robertkowalski added a commit to robertkowalski/npm that referenced this issue Oct 16, 2013

Member

robertkowalski commented Oct 16, 2013

ok i'll open a new PR. please test it @domenic.

robertkowalski added a commit to robertkowalski/npm that referenced this issue Oct 17, 2013

robertkowalski added a commit to robertkowalski/npm that referenced this issue Oct 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment