Closed Bug 1077372 Opened 7 years ago Closed 7 years ago

When a jpm add-on depends on addon-pathfinder then jpm test fails to run the pathfinder tests

Categories

(Add-on SDK Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: evold, Assigned: evold)

References

Details

Attachments

(1 file)

At the moment, if a jpm add-on depends on a modules which includes test files, then running jpm test on the addon fails because the dependencies tests files are loaded incorrectly.  They should not be loaded at all though, they shouldn't even be included in the xpi.


JPM info   Message: Module `./addon-pathfinder/test/test-addon-folder` is not found at resource://about-history-at-jetpack/addon-pathfinder/test/test-addon-folder.js
  Stack:
    findTests/</getNextTest@resource://gre/modules/commonjs/sdk/deprecated/unit-test-finder.js:156:25
findTests/</<.getNext@resource://gre/modules/commonjs/sdk/deprecated/unit-test-finder.js:189:32
runNextTest@resource://gre/modules/commonjs/sdk/deprecated/unit-test.js:495:14
startMany@resource://gre/modules/commonjs/sdk/deprecated/unit-test.js:509:12
findAndRunTests/<@resource://gre/modules/commonjs/sdk/deprecated/unit-test.js:28:1
Handler.prototype.process@resource://gre/modules/Promise-backend.js:865:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise-backend.js:744:7


JPM info console.log: about-history: [JavaScript Error: "A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Fri Oct 03 2014 12:12:15 GMT+0100 (BST)
Full Message: Module `./addon-pathfinder/test/test-addon-folder` is not found at resource://about-history-at-jetpack/addon-pathfinder/test/test-addon-folder.js" {file: "resource://gre/modules/commonjs/sdk/deprecated/unit-test-finder.js" line: 156 column: 0 source: "156"}]
OS: Mac OS X → All
Hardware: x86 → All
Priority: -- → P1
I think a hack that we can use to do this would be to check `isNative` and if this is the case, then ignore anything that is not in the root test(s) folder.
Assignee: nobody → evold
Attachment #8501250 - Flags: review?(jsantell) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/7cb18ecff6f2ca5e330717b2ca19d3991c646737
Bug 1077372 - When a jpm add-on depends on addon-pathfinder then jpm test fails to run the pathfinder tests

https://github.com/mozilla/addon-sdk/commit/f1091a4fc7c9e1f3918c367eda66b3f190e3e626
Merge pull request #1674 from erikvold/1077372

Bug 1077372 - When a jpm add-on depends on addon-pathfinder then jpm test fails to run the pathfinder tests r=jsantell
Weird the failing test is passing locally for me, and my patch should not have affected this failing test, so I'm not sure what's wrong with it.
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/fa81fee804c725c51947fe334c982588846ccc33
Bug 1077372 - When a jpm add-on depends on addon-pathfinder then jpm test fails to run the pathfinder tests r=jsantell
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Duplicate of this bug: 1075448
You need to log in before you can comment on or make changes to this bug.