Closed
Bug 1032114
Opened 11 years ago
Closed 11 years ago
TPS fails to decode Windows file paths in config file
Categories
(Testing Graveyard :: TPS, defect)
Tracking
(firefox31 fixed, firefox32 fixed, firefox33 fixed)
RESOLVED
FIXED
mozilla33
People
(Reporter: cosmin-malutan, Assigned: cosmin-malutan)
References
()
Details
Attachments
(1 file)
|
887 bytes,
patch
|
whimboo
:
review+
|
Details | Diff | Splinter Review |
While running tps testruns on a windows slave I've got the following error:
The exact log I've got was:
>21:11:36 config = json.loads(configcontent)
>21:11:36 File "C:\Python27\Lib\json\__init__.py", line 338, in loads
>21:11:36 return _default_decoder.decode(s)
>21:11:36 File "C:\Python27\Lib\json\decoder.py", line 365, in decode
>21:11:36 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>21:11:36 File "C:\Python27\Lib\json\decoder.py", line 381, in raw_decode
>21:11:36 obj, end = self.scan_once(s, idx)
This was because on config file we had escaped characters (backslash) "\" instead of slash ('/').
As a workaround I replaced the '\' with '//' in tps cli, but I guess this could be also fixed in create_venv.py script where we writhe the JSON file.
config = json.loads(configcontent.replace("\\", "//"))
https://github.com/mozilla/gecko-dev/blob/b1328768a61c298a0c78c6309f574f9c25ccf792/testing/tps/tps/cli.py#L87
Comment 1•11 years ago
|
||
Since when does this problem occur? I mean what regressed that functionality?
| Assignee | ||
Comment 2•11 years ago
|
||
I don't know if this regressed somewhere or if I had different settings when I created the create_venv.py script.
Best would be replace the backslashes before we write down the config file, as they escape characters. Also we don't have to check the os because only on windows we have backslashes in config file. I ran this on mac and windows and now I'm running on linux.
Assignee: nobody → cosmin.malutan
Status: NEW → ASSIGNED
Attachment #8447990 -
Flags: review?(hskupin)
Comment 3•11 years ago
|
||
Comment on attachment 8447990 [details] [diff] [review]
patch v1.0
Review of attachment 8447990 [details] [diff] [review]:
-----------------------------------------------------------------
I only call this a pretty bad workaround. What we actually should do here is to properly load and save the config via the json module. That will ensure that we will get proper paths. Given that we have to get the framework working, we need this immediately. Please file a follow-up bug for the real fix.
Also this is one more situation when a patch has not been tested. In this case the one from bug 1009004.
Attachment #8447990 -
Flags: review?(hskupin) → review+
Updated•11 years ago
|
Summary: TPS cli fails to decode the config.json on windows → TPS fails to decode Windows file paths in config file
Comment 4•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/606848e8adfc
Don't forget to set the status flags which versions are affected.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-firefox31:
--- → affected
status-firefox32:
--- → affected
status-firefox33:
--- → fixed
Resolution: --- → FIXED
Comment 5•11 years ago
|
||
The patch works fine on Windows. I backported those to Aurora and Beta, so we get tests running on those branches.
https://hg.mozilla.org/releases/mozilla-aurora/rev/5d619b544f5a
https://hg.mozilla.org/releases/mozilla-beta/rev/4098e00458ca
Updated•11 years ago
|
Target Milestone: --- → mozilla33
Updated•7 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•