Note: There are a few cases of duplicates in user autocompletion which are being worked on.

test_voicemail_statuschanged.py loads ril_consts.js from arbitrary in-tree location

RESOLVED FIXED in mozilla17

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jgriffin, Assigned: marshall_law)

Tracking

Trunk
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
The Marionette test test_voicemail_statuschanged.py loads the file 'ril_consts.js' from the relative path '../../../system/gonk'.

This works fine when running the test in-tree, but in continuous integration, we don't run tests that way...we will run them via packaged tests, and that file will not be available.

We should update this test to include the needed constants within the test's .js file.
(Reporter)

Updated

5 years ago
Blocks: 736710
(Assignee)

Comment 1

5 years ago
There is a large chunk of constants needed by this test (specifically the language tables for translating the PDUs). Maybe the test could import the ril_consts module from Components.utils instead..
(Assignee)

Updated

5 years ago
Assignee: nobody → marshall
There should be no need for test_voicemail_statuschanged.py. If the test needs to load a file that ships with Gecko, it can do something like:

  var Cu = SpecialPowers.unwrap(Components).utils;
  var RIL = {};
  Cu.import("resource://gre/modules/ril_consts.js, RIL);

I'm not 100% sure what we can for loading pdu_builder.js. We could have Marionette map the current test's location to a resource alias, or we could provide a file:/// URI as a global variable in the test scope. jgriffin?
(Reporter)

Comment 3

5 years ago
(In reply to Philipp von Weitershausen [:philikon] from comment #2)
> There should be no need for test_voicemail_statuschanged.py. If the test
> needs to load a file that ships with Gecko, it can do something like:
> 
>   var Cu = SpecialPowers.unwrap(Components).utils;
>   var RIL = {};
>   Cu.import("resource://gre/modules/ril_consts.js, RIL);
> 
> I'm not 100% sure what we can for loading pdu_builder.js. We could have
> Marionette map the current test's location to a resource alias, or we could
> provide a file:/// URI as a global variable in the test scope. jgriffin?

It's probably a good idea to add dyanmic resource url mappings for cases like this.  I'll file another bug for that.
(Assignee)

Comment 4

5 years ago
Created attachment 645801 [details] [diff] [review]
vm test pathing fix - v1
Attachment #645801 - Flags: review?(philipp)
Attachment #645801 - Flags: review?(philipp) → review+
(Assignee)

Comment 5

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/bc9be59cca93

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/bc9be59cca93
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.