Closed Bug 793035 Opened 7 years ago Closed 7 years ago
cfx testcfx failing on Windows
All Windows test runs are currently failing, due to this: FAIL: test_contents (cuddlefish.tests.test_xpi.SmallXPI) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\talos-slave\test\addonsdk-poller\addon-sdk-8d61f5d18ce1\python-lib\cuddlefish\tests\test_xpi.py", line 196, in test_contents self.failUnlessEqual(list(missing), ) AssertionError: ['C:\\talos-slave\\test\\addonsdk-poller\\addon-sdk-8d61f5d18ce1\\packages\\api-utils\\lib\\utils/object.js', 'C:\\talos-slave\\test\\addonsdk-poller\\addon-sdk-8d61f5d18ce1\\packages\\api-utils\\lib\\url/io.js'] !=  In the test, io.js and object.js are specified as "url/io.js" and "utils/object.js", which is then being directly appended to the (supposed-to-be) platform specific path to those files, which is wrong on Windows. So, this patch just uses os.path.join to get the platform-specific paths to those modules.
Tests pass for me with this patch locally on both Ubuntu and Windows, for what it's worth.
As it turns out, url/io tests were actually failing beyond the testcfx stuff. Line endings are different on Windows, so the tests checking against unix line endings were failing.
Wes, if it's fine for Irakli I can review this patch. In order to simplify the test, I will suggest to revert the `test-uri-io.txt` to the original form, that was without new line at the end. I changed it during the review process, and now I realize the mistake. If we remove the new line from that file, then we don't have to branch based on the OS the constants, and they will simply be: const utf8text = "Hello, ゼロ!"; const latin1text = "Hello, ã‚¼ãƒ!"; The python code looks ok to me!
Here's a version that removes the newline character.
Comment on attachment 663523 [details] [diff] [review] remove newline from test file I trust you the character is removed, because the diff doesn't show new line chars. ;)
Attachment #663523 - Flags: review?(zer0) → review+
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/efe90075a82b9ba9f2c367ac675ed53ef904c84e fix Bug 793035 - url/io failing on Windows
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Looks like tests are passing with this, so I went ahead and pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/f7354c77ad5c
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.