/usr/local/bin/python /Users/jeff/code/jetpack/addon-sdk/bin/cfx
--binary=/Applications/Aurora.app
--profiledir=/Users/jeff/Library/Application\
Support/Firefox/Profiles/0000000.Default run
...Firefox starts up but then immediately quits.
If I run testall instead I get a test failure ( see below for full error
output ). This happened to work previously and I found it convenient to
create an executable
While it wasn't necessarily a 'feature' of cfx to be able to run it
without the environment activated, there are valid reasons why you might
want to, for example if you wanted to integrate cfx test with
ant/jenkins for continuous integration. I believe there are people out
there currently that want to do this as well:
Here's the full test failure output:
error: TEST FAILED: test-context-menu.testNewWindowMultipleModules (failure)
error: fail: The first item in sorted order should have the first
element in sorted order (2 != 1)
info: Traceback (most recent call last):
File
"resource://68279f75-1a05-4e71-8e61-54bbc5ac4569-at-jetpack/api-utils/lib/timer.js",
line 66, in notifyOnTimeout
this._callback.apply(null, this._params);
File
"resource://68279f75-1a05-4e71-8e61-54bbc5ac4569-at-jetpack/addon-kit/tests/test-context-menu.js",
line 1881, in null
callback.call(self, evt);
File
"resource://68279f75-1a05-4e71-8e61-54bbc5ac4569-at-jetpack/addon-kit/tests/test-context-menu.js",
line 2021, in null
onshownCallback.call(this, popup);
File
"resource://68279f75-1a05-4e71-8e61-54bbc5ac4569-at-jetpack/addon-kit/tests/test-context-menu.js",
line 1043, in null
test.checkMenu([item], [], []);
File
"resource://68279f75-1a05-4e71-8e61-54bbc5ac4569-at-jetpack/addon-kit/tests/test-context-menu.js",
line 1751, in null
this.checkSort(presentItems);
File
"resource://68279f75-1a05-4e71-8e61-54bbc5ac4569-at-jetpack/addon-kit/tests/test-context-menu.js",
line 1865, in null
"The first item in sorted order should have the " +
File
"resource://68279f75-1a05-4e71-8e61-54bbc5ac4569-at-jetpack/api-utils/lib/unit-test.js",
line 192, in assertEqual
this.fail(message);
File
"resource://68279f75-1a05-4e71-8e61-54bbc5ac4569-at-jetpack/api-utils/lib/unit-test.js",
line 99, in fail
this.console.trace();
console: [JavaScript Warning: "Duplicate resource declaration for
'services-sync' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/components/components.manifest"
line: 274}]
console: [JavaScript Warning: "Duplicate resource declaration for
'services-crypto' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/components/components.manifest"
line: 275}]
console: [JavaScript Warning: "Duplicate resource declaration for
'gre-resources' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/chrome/nonlocalized.manifest"
line: 27}]
console: [JavaScript Warning: "Duplicate resource declaration for
'services-sync' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/components/components.manifest"
line: 274}]
console: [JavaScript Warning: "Duplicate resource declaration for
'services-crypto' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/components/components.manifest"
line: 275}]
console: [JavaScript Warning: "Duplicate resource declaration for
'gre-resources' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/chrome/nonlocalized.manifest"
line: 27}]
console: [JavaScript Warning: "Duplicate resource declaration for
'services-sync' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/components/components.manifest"
line: 274}]
console: [JavaScript Warning: "Duplicate resource declaration for
'services-crypto' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/components/components.manifest"
line: 275}]
console: [JavaScript Warning: "Duplicate resource declaration for
'gre-resources' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/chrome/nonlocalized.manifest"
line: 27}]
console: [JavaScript Warning: "Duplicate resource declaration for
'services-sync' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/components/components.manifest"
line: 274}]
console: [JavaScript Warning: "Duplicate resource declaration for
'services-crypto' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/components/components.manifest"
line: 275}]
console: [JavaScript Warning: "Duplicate resource declaration for
'gre-resources' ignored." {file:
"jar:file:///Applications/Aurora.app/Contents/MacOS/omni.ja!/chrome/nonlocalized.manifest"
line: 27}]
Traceback (most recent call last):
File "/Users/jeff/code/jetpack/addon-sdk/bin/cfx", line 29, in <module>
cuddlefish.run()
File
"/Users/jeff/code/jetpack/addon-sdk/python-lib/cuddlefish/__init__.py",
line 518, in run
test_all(env_root, defaults=options.__dict__)
File
"/Users/jeff/code/jetpack/addon-sdk/python-lib/cuddlefish/__init__.py",
line 330, in test_all
test_all_packages(env_root, defaults)
File
"/Users/jeff/code/jetpack/addon-sdk/python-lib/cuddlefish/__init__.py",
line 390, in test_all_packages
env_root=env_root)
File
"/Users/jeff/code/jetpack/addon-sdk/python-lib/cuddlefish/__init__.py",
line 796, in run
mobile_app_name=options.mobile_app_name)
File
"/Users/jeff/code/jetpack/addon-sdk/python-lib/cuddlefish/runner.py",
line 608, in run_app
OUTPUT_TIMEOUT)
Exception: Test output exceeded timeout (60s).
+1
I also have
$ cat /usr/local/bin/cfx
#!/bin/sh
/path/to/my/addon/checkout/bin/cfx
--binary=/path/to/my/own/build/of/firefox $1 $2 $3
and find that critical to use the SDK conveniently. "cfx test" for my
addon works well (so I'm fine for now), "cfx run" for apt-utils fails
with "TypeError: self[eventHandler].add is not a function"