Closed Bug 635959 Opened 13 years ago Closed 13 years ago

ERROR: test_generate_static_docs_does_not_smoke (cuddlefish.tests.test_server.ServerTests)

Categories

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

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ashah, Unassigned)

References

Details

Attachments

(1 file)

SDK: 1.0b3 RC1
Browser: FFx 4.0b11
Platform: Win 7

I ran my integration script against the RC1 and found the following error:

"ERROR: test_generate_static_docs_does_not_smoke (cuddlefish.tests.test_server.Se rverTests)"
The traceback is as follows:

Traceback (most recent call last):
  File "C:\Users\mozilla\Downloads\addon-sdk-1.0b3\python-lib\cuddlefish\tests\t
est_server.py", line 13, in test_generate_static_docs_does_not_smoke
    server.generate_static_docs(env_root, tgz_filename=filename)
  File "C:\Users\mozilla\Downloads\addon-sdk-1.0b3\python-lib\cuddlefish\server.
py", line 355, in generate_static_docs
    package_doc_html = web_docs.create_package_page(src_dir)
  File "C:\Users\mozilla\Downloads\addon-sdk-1.0b3\python-lib\cuddlefish\webdocs
.py", line 81, in create_package_page
    package_content = self._create_package_detail(package_name)
  File "C:\Users\mozilla\Downloads\addon-sdk-1.0b3\python-lib\cuddlefish\webdocs
.py", line 166, in _create_package_detail
    raise IOError(errno.ENOENT, 'Package not found')
IOError: [Errno 2] Package not found


Logs are available at http://pastebin.mozilla.org/1088089

Note: FYI, The command that is executed from inside the integration script is:
"cfx testall -b /Applications/Firefox4.0b11/Firefox.app"
Happens on Windows XP as well
Will, Warner: any thoughts on this?
(In reply to comment #2)
> Will, Warner: any thoughts on this?

Probably that 'package_name = path.split('/')[-1]' will not work on Windows, and needs to be something like:

     def create_package_page(self, path):
         path, ext = os.path.splitext(path)
-        package_name = path.split('/')[-1]
+        head, package_name = os.path.split(path)
         package_content = self._create_package_detail(package_name)
         return self._create_page(package_content)
yeah, that ought to do it.

I skimmed webdocs.py, it didn't look like any other code is relying upon non-platform-specific separators. But is there anything in there which copies a multi-part OS-side path into a URL path? Which might get messed up when the OS side uses backslashes? Like ...\parentdir\packagename\modname which should be exposed as "parentdir/packagename/modname" not "parentdir\packagename/modname"?
Will: can you put together a patch for Brian to review?
Attachment #514358 - Flags: review?(warner-bugzilla)
Comment on attachment 514358 [details] [diff] [review]
Fix webd-docs for Windows

looks great!
Attachment #514358 - Flags: review?(warner-bugzilla) → review+
Landed in https://github.com/mozilla/addon-sdk/commit/9f0477b368d020b2e4bd267092979def4f00fc19
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: