Closed Bug 793035 Opened 10 years ago Closed 10 years ago

cfx testcfx failing on Windows.


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



(Not tracked)



(Reporter: KWierso, Assigned: KWierso)




(1 file, 2 obsolete files)

Attached patch fix it (obsolete) — Splinter Review
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\", 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.
Attachment #663211 - Flags: review?(rFobic)
Tests pass for me with this patch locally on both Ubuntu and Windows, for what it's worth.
Assignee: nobody → kwierso
Priority: -- → P1
OS: Linux → All
Hardware: x86 → All
Attached patch Fix all of url/io (obsolete) — Splinter Review
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.
Attachment #663211 - Attachment is obsolete: true
Attachment #663211 - Flags: review?(rFobic)
Attachment #663224 - Flags: review?(rFobic)
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.
Attachment #663224 - Attachment is obsolete: true
Attachment #663224 - Flags: review?(rFobic)
Attachment #663523 - Flags: review?(zer0)
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+
Closed: 10 years ago
Resolution: --- → FIXED
Looks like tests are passing with this, so I went ahead and pushed to inbound:
Resolution: FIXED → ---
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.