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 failing on debian build environment #15

Closed
pravi opened this issue Oct 29, 2016 · 4 comments
Closed

test failing on debian build environment #15

pravi opened this issue Oct 29, 2016 · 4 comments

Comments

@pravi
Copy link

pravi commented Oct 29, 2016

mocha -R spec


  prefix
    1) should resolve the path to the global prefix:


  0 passing (18ms)
  1 failing

  1) prefix should resolve the path to the global prefix::

      AssertionError: '/usr/local' == '/usr'
      + expected - actual

      -/usr/local
      +/usr

      at Context.<anonymous> (/<<PKGBUILDDIR>>/test.js:26:16)
      at callFn (/usr/lib/nodejs/mocha/lib/runnable.js:223:21)
      at Test.Runnable.run (/usr/lib/nodejs/mocha/lib/runnable.js:216:7)
      at Runner.runTest (/usr/lib/nodejs/mocha/lib/runner.js:373:10)
      at /usr/lib/nodejs/mocha/lib/runner.js:451:12
      at next (/usr/lib/nodejs/mocha/lib/runner.js:298:14)
      at /usr/lib/nodejs/mocha/lib/runner.js:308:7
      at next (/usr/lib/nodejs/mocha/lib/runner.js:246:23)
      at Immediate._onImmediate (/usr/lib/nodejs/mocha/lib/runner.js:275:5)
      at processImmediate [as _immediateCallback] (timers.js:383:17)

Debian's nodejs has this patch https://anonscm.debian.org/cgit/collab-maint/nodejs.git/tree/debian/patches/2001_FHS_and_rename_to_nodejs.patch which I suspect is making the default to /usr. How can we handle this case?

--- a/lib/module.js
+++ b/lib/module.js
@@ -616,7 +616,7 @@
     homeDir = process.env.HOME;
   }

-  var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
+  var paths = ['/usr/lib/nodejs'];

   if (homeDir) {
     paths.unshift(path.resolve(homeDir, '.node_libraries'));
@doowb
Copy link
Collaborator

doowb commented Oct 29, 2016

Hi @pravi will you try this PR on debian? That PR is passing in ubuntu and may work on debian but I don't have access to debian to test it.

I'm not familiar with how debian handles node.js. Are you linking to code that patches node.js when the node.js is built (installed and built?) in debian?

@pravi
Copy link
Author

pravi commented Oct 29, 2016

@doowb , thanks, the tests are passing now.

These patches -> https://anonscm.debian.org/cgit/collab-maint/nodejs.git/tree/debian/patches are applied to nodejs during build. Ubuntu usually takes the same packages from debian (only version numbers differ due to difference in release cycles).

@doowb
Copy link
Collaborator

doowb commented Oct 29, 2016

the tests are passing now.

Thanks for running them. We'll try to get that PR merged and published soon.

@doowb
Copy link
Collaborator

doowb commented Nov 30, 2016

Merged the PR and published as 0.1.5. Let us know if you're still having issues.

@doowb doowb closed this as completed Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants