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

Tests fail on Linux if gcore is not installed (with misleading message) #249

Closed
mmarchini opened this issue Nov 30, 2018 · 2 comments
Closed

Comments

@mmarchini
Copy link
Member

@mmarchini mmarchini commented Nov 30, 2018

Message was really not helpful:

# v8 findrefs and friends
ok 79 null
ok 80 Saved core
ok 81 null
ok 82 Loaded core
ok 83 null
not ok 84 Class should be in findjsobjects
  ---
    operator: ok
    expected: true
    actual:   false
    at: sess.linesUntil (/home/mmarchini/llnode/test/plugin/scan-test.js:37:7)
    stack: |-
      Error: Class should be in findjsobjects
          at Test.assert [as _assert] (/home/mmarchini/llnode/node_modules/tape/lib/test.js:224:54)
          at Test.bound [as _assert] (/home/mmarchini/llnode/node_modules/tape/lib/test.js:76:32)
          at Test.assert (/home/mmarchini/llnode/node_modules/tape/lib/test.js:342:10)
          at Test.bound [as ok] (/home/mmarchini/llnode/node_modules/tape/lib/test.js:76:32)
          at sess.linesUntil (/home/mmarchini/llnode/test/plugin/scan-test.js:37:7)
          at SessionOutput.onLine (/home/mmarchini/llnode/test/common.js:113:5)
          at emitOne (events.js:96:13)
          at SessionOutput.emit (events.js:188:7)
          at Socket.SessionOutput.stream.on (/home/mmarchini/llnode/test/common.js:63:14)
          at emitOne (events.js:96:13)
  ...
ok 85 null
not ok 86 "Class: x, y, hashmap" should be in findjsobjects -d
  ---
    operator: ok
    expected: true
    actual:   false
    at: sess.linesUntil (/home/mmarchini/llnode/test/plugin/scan-test.js:46:7)
    stack: |-
      Error: "Class: x, y, hashmap" should be in findjsobjects -d
          at Test.assert [as _assert] (/home/mmarchini/llnode/node_modules/tape/lib/test.js:224:54)
          at Test.bound [as _assert] (/home/mmarchini/llnode/node_modules/tape/lib/test.js:76:32)
          at Test.assert (/home/mmarchini/llnode/node_modules/tape/lib/test.js:342:10)
          at Test.bound [as ok] (/home/mmarchini/llnode/node_modules/tape/lib/test.js:76:32)
          at sess.linesUntil (/home/mmarchini/llnode/test/plugin/scan-test.js:46:7)
          at SessionOutput.onLine (/home/mmarchini/llnode/test/common.js:113:5)
          at emitOne (events.js:96:13)
          at SessionOutput.emit (events.js:188:7)
          at Socket.SessionOutput.stream.on (/home/mmarchini/llnode/test/common.js:63:14)
          at emitOne (events.js:96:13)
  ...
ok 87 null
/home/mmarchini/llnode/test/plugin/scan-test.js:57
    t.ok((lines.join('\n').match(/<Object: Class_B>/g)).length == 10, 'Should show 10 instances');
                                                       ^

TypeError: Cannot read property 'length' of null
    at sess.linesUntil (/home/mmarchini/llnode/test/plugin/scan-test.js:57:56)
    at SessionOutput.onLine (/home/mmarchini/llnode/test/common.js:113:5)
    at emitOne (events.js:96:13)
    at SessionOutput.emit (events.js:188:7)
    at Socket.SessionOutput.stream.on (/home/mmarchini/llnode/test/common.js:63:14)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:559:20)

We should check if gcore is installed and skip otherwise.

@Drieger
Copy link
Contributor

@Drieger Drieger commented Dec 6, 2018

@mmarchini how can I trigger the error? I'm trying to reproduce it, but even after moving gcore

-bash: /usr/bin/gcore: No such file or directory

all tests passed

...
1..126
# tests 126
# pass  126

# ok
@mmarchini mmarchini pinned this issue Dec 17, 2018
@mmarchini mmarchini unpinned this issue Dec 17, 2018
@mmarchini
Copy link
Member Author

@mmarchini mmarchini commented Aug 5, 2020

We don't use gcore on tests anymore

@mmarchini mmarchini closed this Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.