Node: Can't run tests

Created on 7 Aug 2017  路  8Comments  路  Source: nodejs/node

  • Version: 9.0.0-pre (master)
  • Platform: Ubuntu 16.10
  • Subsystem: gyp


Running make -j4 test fails with the following output

Building addon /home/madara/projects/node/test/addons-napi/test_instanceof/
gyp: binding.gyp not found (cwd: /home/madara/projects/node/test/addons-napi/test_instanceof) while trying to load binding.gyp
Makefile:288: recipe for target 'test/addons-napi/.buildstamp' failed
make[1]: *** [test/addons-napi/.buildstamp] Error 1
Makefile:196: recipe for target 'test' failed
make: *** [test] Error 2

goodnessSquad

Fixit @benjamingr

addons test

Most helpful comment

git clean -xdf but it's strong stuff (as in it will remove __anything__ git doesn't know, including any IDE meta files, any temp files or sketches you might have, and might also try to remove your underwear)

All 8 comments

You sometimes need to run test-addons-clean when switching between branches or when some addon tests have been changed since you last ran them :)

I have no such command, is that a make target?

yeah, right, I meant make test-addons-clean ;)

Didn't seem to work, I'm still getting the exact same error after running make test-addons-clean and then make -j4 test again.

@MadaraUchiha When I get stuck like that, I use what I affectionately refer to as "The Sledgehammer Approach":

rm -rf test/addons-napi/ && git checkout test/addons-napi && ./configure && make -j4 test

There's a way to do that first part with rm + git and just using git, but I always forget the syntax. I think @refack informed me of it, but I still do the above instead.

FWIW make test-addons-clean works when you do it before switching branches...doing it after probably does not help because it only helps git clean up the artifacts.

We can make make test use git clean to do it properly, but I am not sure if it's a good idea to assume the existence of git in a command like this?

git clean -xdf but it's strong stuff (as in it will remove __anything__ git doesn't know, including any IDE meta files, any temp files or sketches you might have, and might also try to remove your underwear)

Closing, looks like this has been answered.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seishun picture seishun  路  3Comments

akdor1154 picture akdor1154  路  3Comments

danielstaleiny picture danielstaleiny  路  3Comments

addaleax picture addaleax  路  3Comments

fanjunzhi picture fanjunzhi  路  3Comments