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

napi test throws error #13031

Closed
zimbabao opened this issue May 15, 2017 · 6 comments
Closed

napi test throws error #13031

zimbabao opened this issue May 15, 2017 · 6 comments
Labels
node-api Issues and PRs related to the Node-API.

Comments

@zimbabao
Copy link
Contributor

  • Version: v8.0.0-pre ( hash 9516aa1)
  • Platform: MacOSX
  • Subsystem: napi

make test

Throws following error on mac.

=== release test ===
Path: addons-napi/test_array/test
assert.js:557
    throw actual;
    ^

TypeError: test_array.TestGetElement is not a function
    at assert.throws (/Users/rgaunker/os/node/test/addons-napi/test_array/test.js:24:16)
    at _tryBlock (assert.js:514:5)
    at _throws (assert.js:535:12)
    at Function.throws (assert.js:565:3)
    at Object.<anonymous> (/Users/rgaunker/os/node/test/addons-napi/test_array/test.js:22:8)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
Command: out/Release/node --napi-modules /Users/rgaunker/os/node/test/addons-napi/test_array/test.js
[03:12|% 100|+ 1529|-   3]: Done
make: *** [test] Error 1
@zimbabao
Copy link
Contributor Author

Likely old napi build folder ./test/addons-napi/test_array/build/ is not cleaned or updated even after code is changed.

@Trott
Copy link
Member

Trott commented May 15, 2017

My knowledge in this area is limited but: There's a test-addons-clean task in the Makefile that I think is for when things get in a stale state. But it doesn't clean addons-napi nor is there a separate task that does that.

@mscdex mscdex added the node-api Issues and PRs related to the Node-API. label May 15, 2017
@joyeecheung
Copy link
Member

joyeecheung commented May 15, 2017

@Trott test-addons-clean was added before napi lands so now it needs an update...I'll open a PR for that.

Meanwhile, does adding rules like test-addons-clean to make clean sound like a good idea? There is also test-gc-clean which cleans up artifacts generated by test-gc (not run if you just make clean, has to be triggered separately). In my experience it's pretty common to bump into stale addon builds when you are switching branches (e.g. when backporting)

@zimbabao
Copy link
Contributor Author

make clean should clean should clean all or atleast should have target like reallyclean .

mhdawson pushed a commit that referenced this issue May 17, 2017
PR-URL: #13034
Ref: #13031
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rajaram Gaunker <[email protected]>
anchnk pushed a commit to anchnk/node that referenced this issue May 19, 2017
PR-URL: nodejs#13034
Ref: nodejs#13031
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rajaram Gaunker <[email protected]>
@cjihrig
Copy link
Contributor

cjihrig commented Jul 6, 2017

@zimbabao is this still an issue?

@zimbabao
Copy link
Contributor Author

zimbabao commented Jul 6, 2017

@cjihrig : Haven't faced issue anymore. Closing the ticket.

@zimbabao zimbabao closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

No branches or pull requests

5 participants