Closed Bug 1684857 Opened 3 years ago Closed 3 years ago

DAMP test-head file should require the current `DAMP` instance

Categories

(DevTools :: Framework, task, P3)

task

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file)

From https://phabricator.services.mozilla.com/D97732#inline-558464

DAMP's test head file has a mandatory initialize step that is called from damp.js: https://searchfox.org/mozilla-central/rev/2fcab997046ba9e068c5391dc7d8848e121d84f8/testing/talos/talos/tests/devtools/addon/content/tests/head.js#34-40

let damp = null;
/*
 * This method should be called by js before starting the tests.
 */
exports.initialize = function(_damp) {
  damp = _damp;
};

If damp.js would expose the current DAMP instance, the head.js file could simply require it.

Depends on D97733

Exporting the current DAMP runner as a singleton from damp.js simplifies the dependency management between damp.js and head.js

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/655f3c4bd5a3
[devtools] Export current DAMP runner from damp.js r=ochameau,perftest-reviewers,kimberlythegeek

With the change in this patch the same DAMP instance is reused for each test suite until the browser is closed. But currently DAMP doesn't support calling startTest twice. After the second run is done, when calling _doneInternal, we perform the following check:

    if (this._done) {
      return;
    }
    this._done = true;

https://searchfox.org/mozilla-central/rev/a0ccd492719b1ad2106f6456549be62a76f45acb/testing/talos/talos/tests/devtools/addon/content/damp.js#343-346

And since _done is not set to "false" again when calling startTest, the test hangs here. Let's see if resetting done is enough to fix DAMP: https://treeherder.mozilla.org/jobs?repo=try&revision=522d1226f2b1143ea7b63d385c44a48cd7957f5e

Flags: needinfo?(jdescottes)
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be4ed181f53e
[devtools] Export current DAMP runner from damp.js r=ochameau,perftest-reviewers,kimberlythegeek
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: