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

Intern self-tests failing on Windows due to path separator differences #405

Closed
cezarykluczynski opened this issue Jun 2, 2015 · 1 comment
Labels
effort-low Should be pretty quick enhancement A new or improved feature
Milestone

Comments

@cezarykluczynski
Copy link

Three of Intern's self tests are failing on Windows (fix for the forth one can be cherry-picked from cezarykluczynski@73fdbbc).

The main reason seems to be the diffrence in how Windows and Linux reports stack trace in Node.

Tests are:

tests/unit/lib/reporters/Console.js :: fatalError
tests/unit/lib/utils.js :: source map from instrumentation
tests/unit/lib/util.js :: source map from file

Error messages from Windows 7:

$ tests/selftest.sh
Running client tests…
FAIL: main - intern/lib/util - .getErrorMessage - source map from instrumentation
AssertionError: expected 'Error: bar\n  at Object.run  <tests\\unit\\data\\lib\\util\\foo.js:124:19>\n  at <tests\\unit\\lib\\util.js:332:29>\n  at <node_modules\\intern\\lib\\Test.js:118:30>\n  at <node_modules\\intern\\lib\\Test.js:134:34>\n  at execModule  <node_modules\\intern\\node_modules\\dojo\\dojo.js:515:54>\n  at <node_modules\\intern\\node_modules\\dojo\\dojo.js:582:7>\n  at guardCheckComplete  <node_modules\\intern\\node_modules\\dojo\\dojo.js:566:4>\n  at checkComplete  <node_modules\\intern\\node_modules\\dojo\\dojo.js:574:27>\n  at onLoadCallback  <node_modules\\intern\\node_modules\\dojo\\dojo.js:656:7>\n  at <node_modules\\intern\\node_modules\\dojo\\dojo.js:761:5>' to include 'util/foo.js:4'
  at Function.assert.include  <node_modules\intern\node_modules\chai\chai.js:2036:57>
  at <tests\unit\lib\util.js:335:32>
  at <node_modules\intern\lib\Test.js:118:30>
  at <node_modules\intern\lib\Test.js:134:34>
  at execModule  <node_modules\intern\node_modules\dojo\dojo.js:515:54>
  at <node_modules\intern\node_modules\dojo\dojo.js:582:7>
  at guardCheckComplete  <node_modules\intern\node_modules\dojo\dojo.js:566:4>
  at checkComplete  <node_modules\intern\node_modules\dojo\dojo.js:574:27>
  at onLoadCallback  <node_modules\intern\node_modules\dojo\dojo.js:656:7>
  at <node_modules\intern\node_modules\dojo\dojo.js:761:5>
FAIL: main - intern/lib/util - .getErrorMessage - source map from file
AssertionError: expected 'Error: foo\n  at Bar.run  <tests\\unit\\data\\lib\\util\\bar.js:27:23>\n  at <tests\\unit\\lib\\util.js:359:29>\n  at <node_modules\\intern\\lib\\Test.js:118:30>\n  at <node_modules\\intern\\lib\\Test.js:134:34>\n  at execModule  <node_modules\\intern\\node_modules\\dojo\\dojo.js:515:54>\n  at <node_modules\\intern\\node_modules\\dojo\\dojo.js:582:7>\n  at guardCheckComplete  <node_modules\\intern\\node_modules\\dojo\\dojo.js:566:4>\n  at checkComplete  <node_modules\\intern\\node_modules\\dojo\\dojo.js:574:27>\n  at onLoadCallback  <node_modules\\intern\\node_modules\\dojo\\dojo.js:656:7>\n  at <node_modules\\intern\\node_modules\\dojo\\dojo.js:761:5>' to match /\bbar.ts:5\b/
  at Function.assert.match  <node_modules\intern\node_modules\chai\chai.js:2048:44>
  at <tests\unit\lib\util.js:362:32>
  at <node_modules\intern\lib\Test.js:118:30>
  at <node_modules\intern\lib\Test.js:134:34>
  at execModule  <node_modules\intern\node_modules\dojo\dojo.js:515:54>
  at <node_modules\intern\node_modules\dojo\dojo.js:582:7>
  at guardCheckComplete  <node_modules\intern\node_modules\dojo\dojo.js:566:4>
  at checkComplete  <node_modules\intern\node_modules\dojo\dojo.js:574:27>
  at onLoadCallback  <node_modules\intern\node_modules\dojo\dojo.js:656:7>
  at <node_modules\intern\node_modules\dojo\dojo.js:761:5>
FAIL: main - intern/lib/reporters/Console - fatalError
AssertionError: Reporter should indicate the location of the error: expected 'FATAL ERROR\nError: Oops\n  at Test.registerSuite.fatalError [as test]  <tests\\unit\\lib\\reporters\\Console.js:101:25>\n  at Test.run  <node_modules\\intern\\lib\\Test.js:207:31>\n  at <node_modules\\intern\\lib\\Suite.js:237:13>\n  at signalListener  <node_modules\\intern\\node_modules\\dojo\\Deferred.js:37:21>\n  at Promise.then.promise.then  <node_modules\\intern\\node_modules\\dojo\\Deferred.js:258:5>\n  at runTest  <node_modules\\intern\\lib\\Suite.js:236:46>\n  at <node_modules\\intern\\lib\\Suite.js:249:7>\n  at process._tickCallback  <node.js:415:13>' to include 'tests/unit/lib/reporters/Console.js:71'
  at Function.assert.include  <node_modules\intern\node_modules\chai\chai.js:2036:57>
  at Test.registerSuite.fatalError [as test]  <tests\unit\lib\reporters\Console.js:118:24>
  at Test.run  <node_modules\intern\lib\Test.js:207:31>
  at <node_modules\intern\lib\Suite.js:237:13>
  at signalListener  <node_modules\intern\node_modules\dojo\Deferred.js:37:21>
  at Promise.then.promise.then  <node_modules\intern\node_modules\dojo\Deferred.js:258:5>
  at runTest  <node_modules\intern\lib\Suite.js:236:46>
  at <node_modules\intern\lib\Suite.js:249:7>
  at process._tickCallback  <node.js:415:13>
@csnover csnover added the needs-verification Needs to be verified label Jun 4, 2015
@csnover csnover changed the title Tests failing on Windows Intern self-tests failing on Windows due to path separator differences Jun 10, 2015
@csnover csnover added help-wanted and removed needs-verification Needs to be verified labels Jun 25, 2015
@csnover
Copy link
Member

csnover commented Jun 25, 2015

Yep, they are, seems the failures are all related to path separators (as is always the case with anything related to Windows). I’d be happy to accept a patch for this but since we don’t currently have CI for Windows it’s not a very high priority.

@csnover csnover added enhancement A new or improved feature effort-low Should be pretty quick labels Jun 25, 2015
@csnover csnover closed this as completed in b97e3a2 Sep 1, 2015
csnover added a commit that referenced this issue Sep 1, 2015
This basically forces all paths to always use forward-slash
everywhere, except in the instrumentation system which has to
use OS-specific path separators to render properly, and the
source mapping system which needs to render source paths in
the same way that they natively appear in Windows.

Fixes #459. Fixes #405.

(cherry picked from commit b97e3a2)
@csnover csnover added this to the 3.0.1 milestone Sep 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-low Should be pretty quick enhancement A new or improved feature
Projects
None yet
Development

No branches or pull requests

2 participants