Closed
Bug 1198448
Opened 9 years ago
Closed 9 years ago
Calling firefox-ui-update (script generated through console_scripts) on Windows triggers the UAC prompt
Categories
(Testing :: Firefox UI Tests, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: armenzg, Assigned: armenzg)
References
Details
Attachments
(1 file, 3 obsolete files)
Internally mozharness calls this:
"c:\slave\test\scripts\build\venv\Scripts\firefox-ui-update --installer c:\slave\test\scripts\build\Firefox%20Setup%2040.0b1.exe --gecko-log=- --address=localhost:2828 --update-channel beta-localtest"
Calling that .exe file triggers a Windows UAC prompt.
We explicitely keep the UAC on the Windows test machines to prevent requiring any changes on a machine to run any of our automation.
I can see that the cli call is simply parsing some args and creating and instance of UpdateTestRunner [1][2].
I can make mozharness create an instance of it instead of calling the binary.
Would this work for you? Does this sound reasonable?
[1]
https://github.com/mozilla/firefox-ui-tests/blob/master/firefox_ui_harness/runtests.py#L71
[2]
https://github.com/mozilla/firefox-ui-tests/blob/master/firefox_ui_harness/runners/update.py#L24
Comment 1•9 years ago
|
||
Talked with Armen on IRC and he will try to use the cli_update() method to get the tests started.
Assignee | ||
Comment 2•9 years ago
|
||
How can I determine the return code if calling cli_update() does not return a code?
https://github.com/mozilla/firefox-ui-tests/blob/master/firefox_ui_harness/runtests.py#L71
Comment 3•9 years ago
|
||
I'm not sure how the return code can be examined beside an extra check for $? via bash. I assume that Mark will totally have an answer for us here.
Flags: needinfo?(markh)
Assignee | ||
Comment 4•9 years ago
|
||
Perhaps it is better to instanciate UpdateTestRunner() directly.
I don't think there is any benefit to calling cli() directly.
Assignee: nobody → armenzg
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•9 years ago
|
||
I'm also having trouble with mozisntall believing that the Linux tar ball is a tar ball.
I thought that managing to set up the virtualenv with 2.7.10 instead of 2.7.6 would fix the issue.
0:00.00 LOG: MainThread INFO Installing application "/home/armenzg/repos/mozilla-central/testing/mozharness/build/firefox-40.0b1.tar.bz2" to "/tmp/tmpUGF510"
0:00.00 LOG: MainThread ERROR Failure during execution of the update test.
Traceback (most recent call last):
File "/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runtests.py", line 61, in cli
runner = startTestRunner(runner_class, options, tests)
File "/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runtests.py", line 33, in startTestRunner
install_folder = mozinstall.install(installer, dest_folder)
File "/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7/site-packages/mozinstall/mozinstall.py", line 106, in install
raise InvalidSource(src + ' is not valid installer file.')
InvalidSource: /home/armenzg/repos/mozilla-central/testing/mozharness/build/firefox-40.0b1.tar.bz2 is not valid installer file.
armenzg@armenzg-thinkpad:~/repos/mozilla-central/testing/mozharness$ source build/venv/bin/activate
(venv)armenzg@armenzg-thinkpad:~/repos/mozilla-central/testing/mozharness$ python
Python 2.7.10 (default, Aug 26 2015, 16:29:03)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mozinstall
>>> mozinstall.is_installer("/home/armenzg/repos/mozilla-central/testing/mozharness/build/firefox-40.0b1.tar.bz2")
False
Comment 6•9 years ago
|
||
I'm missing some context here, so I'm not sure what is being asked.
(In reply to Armen Zambrano Gasparnian [:armenzg] from comment #2)
> How can I determine the return code if calling cli_update() does not return
> a code?
>
> https://github.com/mozilla/firefox-ui-tests/blob/master/firefox_ui_harness/
> runtests.py#L71
cli_update calls sys.exit() which can be caught as a SystemExit exception - but I suspect you already know that. If you don't catch it, then yeah, $? from bash seems correct. I doubt that is what you were asking me though.
Flags: needinfo?(markh)
Comment 7•9 years ago
|
||
(In reply to Armen Zambrano Gasparnian [:armenzg] from comment #5)
> I'm also having trouble with mozisntall believing that the Linux tar ball is
> a tar ball.
>
> Python 2.7.10 (default, Aug 26 2015, 16:29:03)
> [GCC 4.8.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import mozinstall
> >>> mozinstall.is_installer("/home/armenzg/repos/mozilla-central/testing/mozharness/build/firefox-40.0b1.tar.bz2")
> False
I had this too a while ago. It was caused by an invalid tar.gz file for a Nightly build. Try to check the file you are using here. Maybe the download was corrupted?
(In reply to Mark Hammond [:markh] from comment #6)
> I'm missing some context here, so I'm not sure what is being asked.
Sorry, so in short Armen tries to run a script (under the Scripts folder) as auto-generated by installing the firefox-ui-tests python package. When doing that he gets a UAC prompt on Windows, which is actually not wanted. So we are looking for alternatives.
Comment 8•9 years ago
|
||
So best I can tell, the executable itself explicitly requests UAC after doing some setup work - the executable itself isn't flagged as requiring UAC (or else permission would be requested before the executable starts, which isn't the case). In other words, this executable extracts a setup.exe, and explicitly launches this setup.exe requesting UAC. This is all done in installer.nsi in mozilla-central, and best I can tell, there's no way to avoid that.
I'm not sure there is a simple answer to that :(
Comment 9•9 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #7)
> I had this too a while ago. It was caused by an invalid tar.gz file for a
> Nightly build. Try to check the file you are using here. Maybe the download
> was corrupted?
I see this too now while working locally on bug 1197358, but in my case it happens if the installer path as specified is not an absolute url. Once I call os.path.abs() on it, the installation succeeds. But that is still different from your case, and I will get it fixed in my patch for bug 1197358.
Assignee | ||
Comment 10•9 years ago
|
||
I also see the matter of the absoulte path working. I can't reproduce that anymore.
There's something weird.
A clean venv with only mozinstall will work.
I will look a bit more into what could be the differences between the two venvs (one set up through mozharness).
Assignee | ||
Comment 11•9 years ago
|
||
My wip patch had some code to allow creating a virtualenv as this:
> virtualenv -p=`which python`
in order that I would get python 2.7.10 instead of python 2.7.6
There was some reason wrt to _sqllite3 missing and I had to rebuild python so I assumed I had to stick to 2.7.10 plus it is nice to use the python interpreter which the user has instead of the original one of the Linux installation.
Getting rid of that code, seems to have put me back into a normal behaviour of mozinstall.
Assignee | ||
Comment 12•9 years ago
|
||
I don't know what to make of this. tarfile can return different values.
I think I will push my changes to try and use the releng set up to test it since I'm confused about my local setup.
armenzg@armenzg-thinkpad:~/repos/mozilla-central/testing/mozharness$ python -c "import tarfile; print tarfile.is_tarfile('/home/armenzg/repos/mozilla-central/testing/mozharness/build/firefox-41.0b3.tar.bz2'); print tarfile.__file__; print tarfile.version"
False
/usr/local/lib/python2.7/tarfile.pyc
0.9.0
/usr/bin/python --version; /usr/bin/python -c "import tarfile; print tarfile.is_tarfile('/home/armenzg/repos/mozilla-central/testing/mozharness/build/firefox-41.0b3.tar.bz2'); print tarfile.__file__; print tarfile.version"
Python 2.7.6
True
/usr/lib/python2.7/tarfile.pyc
0.9.0
build/venv/bin/python --version; build/venv/bin/python -c "import tarfile; print tarfile.is_tarfile('/home/armenzg/repos/mozilla-central/testing/mozharness/build/firefox-41.0b3.tar.bz2'); print tarfile.__file__; print tarfile.version"
Python 2.7.6
True
/usr/lib/python2.7/tarfile.pyc
0.9.0
armenzg@armenzg-thinkpad:~/repos/mozilla-central/testing/mozharness$ python -c "import sys; import pprint; pprint.pprint(sys.path)"
['',
'/usr/local/lib/python2.7/site-packages/setuptools-17.1.1-py2.7.egg',
'/usr/local/lib/python27.zip',
'/usr/local/lib/python2.7',
'/usr/local/lib/python2.7/plat-linux2',
'/usr/local/lib/python2.7/lib-tk',
'/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload',
'/home/armenzg/.local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/site-packages']
armenzg@armenzg-thinkpad:~/repos/mozilla-central/testing/mozharness$ build/venv/bin/python -c "import sys; import pprint; pprint.pprint(sys.path)"
['',
'/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7',
'/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7/plat-x86_64-linux-gnu',
'/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7/lib-tk',
'/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7/lib-old',
'/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/local/lib/python2.7/site-packages',
'/home/armenzg/repos/mozilla-central/testing/mozharness/build/venv/lib/python2.7/site-packages']
armenzg@armenzg-thinkpad:~/repos/mozilla-central/testing/mozharness$ /usr/bin/python -c "import sys; import pprint; pprint.pprint(sys.path)"
['',
'/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg',
'/usr/local/lib/python2.7/dist-packages/pytz-2013.9-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/carrot-0.10.7-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/SQLAlchemy-0.9.1-py2.7-linux-x86_64.egg',
'/usr/local/lib/python2.7/dist-packages/Pylons-1.0.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/amqplib-1.0.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/anyjson-0.3.3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/WebOb-1.3.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/WebTest-2.0.12-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/WebError-0.10.3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/nose-1.3.0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/decorator-3.4.0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/simplejson-3.3.2-py2.7-linux-x86_64.egg',
'/usr/local/lib/python2.7/dist-packages/Beaker-1.6.4-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/WebHelpers-1.3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/Routes-2.0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/beautifulsoup4-4.3.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/waitress-0.8.8-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/Pygments-1.6-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/repoze.lru-0.6-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/google_api_python_client-1.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/bugsy-0.4.0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/blessings-1.6-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/marionette_driver-0.3.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/marionette_client-0.9.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/marionette_transport-0.4-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/progressbar-2.3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/pystache-0.5.4-py2.7.egg',
'/home/armenzg/repos/ci_tools',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/home/armenzg/.local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PILcompat',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
Assignee | ||
Comment 13•9 years ago
|
||
I think calling cli_update() with making modifycations to sys.argv is getting way more troublesome than necessary.
I'm going to try to instantiate the runner and call run_tests instead.
I'm attaching my wip for reference.
I hit the same issue on production versus locally.
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/armenzg@mozilla.com-94cf40a5b2ce/try-macosx64/try_yosemite_test-mochitest-1-bm108-tests1-macosx-build68.txt.gz
python scripts/firefox_ui_updates.py --cfg releng_infra_configs/testers.py --cfg releng_infra_configs/macosx64.py --firefox-ui-branch mozilla-beta --update-verify-config mozBeta-firefox-mac64.cfg --tools-tag FIREFOX_40_0b6_RELEASE_RUNTIME --installer-url http://stage.mozilla.org/pub/mozilla.org//firefox/releases/40.0b1/mac/ach/Firefox%2040.0b1.dmg --cfg developer_config.py
11:34:21 INFO - #####
11:34:21 INFO - ##### Running run-tests step.
11:34:21 INFO - #####
11:34:21 INFO - Running pre-action listener: _pre_run_tests
11:34:21 INFO - Running main action method: run_tests
11:34:21 INFO - Downloading http://stage.mozilla.org/pub/mozilla.org//firefox/releases/40.0b1/mac/ach/Firefox%2040.0b1.dmg to /Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/Firefox%2040.0b1.dmg
11:34:21 INFO - retry: Calling _download_file with args: ('http://stage.mozilla.org/pub/mozilla.org//firefox/releases/40.0b1/mac/ach/Firefox%2040.0b1.dmg', '/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/Firefox%2040.0b1.dmg'), kwargs: {}, attempt #1
^@11:35:26 INFO - Downloaded 77264348 bytes.
11:35:26 INFO - Candidate symbols_url: /Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/Firefox%2040.0b1.crashreporter-symbols.zip
11:35:26 INFO - Getting output from command: ['/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/bin/python', '-c', 'from distutils.sysconfig import get_python_lib; print(get_python_lib())']
11:35:26 INFO - Copy/paste: /Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
11:35:26 INFO - Reading from file tmpfile_stdout
11:35:26 INFO - Output received:
11:35:26 INFO - /Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages
0:00.00 LOG: MainThread INFO Using workspace for temporary data: "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build"
0:00.00 LOG: MainThread INFO Installing application "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/Firefox%2040.0b1.dmg" to "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/binary"
0:25.56 LOG: MainThread INFO Creating a copy of the application at "/var/folders/wl/l70t_q8n6gg64vr7bfzjrqg80000gn/T/tmpahJugj.binary-update-tests".
0:28.54 LOG: MainThread ERROR Failure during execution of the update test.
Traceback (most recent call last):
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runners/update.py", line 70, in _run_tests
FirefoxUITestRunner.run_tests(self, [manifest])
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runners/base.py", line 92, in run_tests
BaseMarionetteTestRunner.run_tests(self, tests)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette/runner/base.py", line 768, in run_tests
self.start_marionette()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette/runner/base.py", line 713, in start_marionette
self.marionette = self.driverclass(**self._build_kwargs())
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 603, in __init__
self.instance.start()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette_driver/geckoinstance.py", line 113, in start
self.runner.start()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/mozrunner/base/browser.py", line 78, in start
BaseRunner.start(self, *args, **kwargs)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/mozrunner/base/runner.py", line 104, in start
self.process_handler.run(self.timeout, self.output_timeout)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/mozprocess/processhandler.py", line 651, in run
self.proc = self.Process([self.cmd] + self.args, **args)
TypeError: __init__() got an unexpected keyword argument 'stream'
0:28.54 LOG: MainThread INFO Removing copy of the application at "/var/folders/wl/l70t_q8n6gg64vr7bfzjrqg80000gn/T/tmpahJugj.binary-update-tests"
0:28.56 LOG: MainThread INFO Creating a copy of the application at "/var/folders/wl/l70t_q8n6gg64vr7bfzjrqg80000gn/T/tmpXshEfd.binary-update-tests".
Exception AttributeError: AttributeError("'ProcessHandler' object has no attribute 'poll'",) in <bound method Marionette.__del__ of <marionette_driver.marionette.Marionette object at 0x105b62e50>> ignored
Exception AttributeError: AttributeError("'ProcessHandler' object has no attribute 'poll'",) in <bound method GeckoRuntimeRunner.__del__ of <mozrunner.base.browser.GeckoRuntimeRunner object at 0x105b62a50>> ignored
0:29.58 LOG: MainThread ERROR Failure during execution of the update test.
Traceback (most recent call last):
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runners/update.py", line 70, in _run_tests
FirefoxUITestRunner.run_tests(self, [manifest])
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runners/base.py", line 92, in run_tests
BaseMarionetteTestRunner.run_tests(self, tests)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette/runner/base.py", line 768, in run_tests
self.start_marionette()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette/runner/base.py", line 713, in start_marionette
self.marionette = self.driverclass(**self._build_kwargs())
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 603, in __init__
self.instance.start()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette_driver/geckoinstance.py", line 113, in start
self.runner.start()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/mozrunner/base/browser.py", line 78, in start
BaseRunner.start(self, *args, **kwargs)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/mozrunner/base/runner.py", line 104, in start
self.process_handler.run(self.timeout, self.output_timeout)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/mozprocess/processhandler.py", line 651, in run
self.proc = self.Process([self.cmd] + self.args, **args)
TypeError: __init__() got an unexpected keyword argument 'stream'
0:29.58 LOG: MainThread INFO Removing copy of the application at "/var/folders/wl/l70t_q8n6gg64vr7bfzjrqg80000gn/T/tmpXshEfd.binary-update-tests"
0:29.61 LOG: MainThread INFO Summary of update tests:
0:29.61 LOG: MainThread INFO Fallback update test ran and PASSED
0:29.61 LOG: MainThread INFO Direct update test ran and PASSED
0:29.61 LOG: MainThread INFO Uninstalling application at "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/binary/Firefox.app"
0:29.64 LOG: MainThread ERROR Failure during execution of the update test.
Traceback (most recent call last):
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runtests.py", line 73, in cli
runner = startTestRunner(runner_class, options, tests)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runtests.py", line 49, in startTestRunner
runner.run_tests(tests)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runners/update.py", line 70, in _run_tests
FirefoxUITestRunner.run_tests(self, [manifest])
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/firefox_ui_harness/runners/base.py", line 92, in run_tests
BaseMarionetteTestRunner.run_tests(self, tests)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette/runner/base.py", line 768, in run_tests
self.start_marionette()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette/runner/base.py", line 713, in start_marionette
self.marionette = self.driverclass(**self._build_kwargs())
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 603, in __init__
self.instance.start()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/marionette_driver/geckoinstance.py", line 113, in start
self.runner.start()
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/mozrunner/base/browser.py", line 78, in start
BaseRunner.start(self, *args, **kwargs)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/venv/lib/python2.7/site-packages/mozrunner/base/runner.py", line 104, in start
self.process_handler.run(self.timeout, self.output_timeout)
File "/Users/armenzg/repos/mozilla-inbound/testing/mozharness/mozprocess/processhandler.py", line 651, in run
self.proc = self.Process([self.cmd] + self.args, **args)
TypeError: __init__() got an unexpected keyword argument 'stream'
11:35:56 INFO - Internally this is the command fx-ui-updates executed
11:35:56 INFO - scripts/firefox_ui_updates.py --installer /Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/Firefox%2040.0b1.dmg --gecko-log=- --address=localhost:2828 --workspace=/Users/armenzg/repos/mozilla-inbound/testing/mozharness/build --symbols-path /Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/Firefox%2040.0b1.crashreporter-symbols.zip
11:35:56 INFO - Copying logs to upload dir...
11:35:56 INFO - mkdir: /Users/armenzg/repos/mozilla-inbound/testing/mozharness/build/upload/logs
Assignee | ||
Comment 14•9 years ago
|
||
Unless we're seeing in here a conflict of mozharness' old mozprocess and the newer version which we installed.
Assignee | ||
Comment 15•9 years ago
|
||
chmanchester: what are your thoughts on how to progress in here?
Trying to call cli() is in need of removing the older mozprocess (comment 13 shows the issue with passing stream) from mozharness (bug 1195299).
I think I could have a POC of bug 1195299 (remove mozprocess/create a preliminiary venv) which would only would be used by Firefox UI tests, hence, not having to block for the final solution there.
I could also duplicate the logic from here instead of calling cli():
https://github.com/mozilla/firefox-ui-tests/blob/master/firefox_ui_harness/runtests.py#L22
Comment 16•9 years ago
|
||
IMHO I would not suggest to duplicate code. It's very likely that this will break when we do changes on the firefox-ui-tests harness.
Assignee | ||
Comment 17•9 years ago
|
||
I started thinking as to why we hit this issue with FX ui tests and not with desktop unittests.
The reason boils down to this, when we generate "firefox-ui-update" binary through python's console_scripts we generate an .exe which it always triggers a UAC prompt.
For desktop unittests we call a python script, hence, not triggering a UAC prompt.
If we had a python script in the firefox_ui_repo that calls cli() I would not have this issue.
whimboo: wfu?
e.g. C:\slave\test\build\venv\Scripts\python -u C:\slave\test\build\tests\mochitest\runtests.py --total-chunks 5 --this-chunk 2 --appname=C:\slave\test\build\application\firefox\firefox.exe --utility-path=tests/bin --extra-profile-file=tests/bin/plugins --symbols-path=https://queue.taskcluster.net/v1/task/NDa-LpnLQyS2DYVnBigdtw/artifacts/public/build/firefox-43.0a1.en-US.win32.crashreporter-symbols.zip --certificate-path=tests/certs --quiet --log-raw=C:\slave\test\build\blobber_upload_dir\plain-chunked_raw.log --log-errorsummary=C:\slave\test\build\blobber_upload_dir\plain-chunked_errorsummary.log --screenshot-on-fail --chunk-by-dir=4
run_command: https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/scripts/desktop_unittest.py?offset=100#593
Assignee | ||
Comment 18•9 years ago
|
||
I meant cli_update()
Comment 19•9 years ago
|
||
(In reply to Armen Zambrano Gasparnian [:armenzg] from comment #17)
> I started thinking as to why we hit this issue with FX ui tests and not with
> desktop unittests.
>
> The reason boils down to this, when we generate "firefox-ui-update" binary
> through python's console_scripts we generate an .exe which it always
> triggers a UAC prompt.
>
> For desktop unittests we call a python script, hence, not triggering a UAC
> prompt.
I'm still missing some context, but my earlier comments were under the impression you were trying to call "Firefox%20Setup%2040.0b1.exe" and not have it prompt for UAC - I don't think there is an easy answer to that. However, desktop unit tests don't run that.
> --this-chunk 2 --appname=C:\slave\test\build\application\firefox\firefox.exe
If your problem is that you are getting a UAC prompt running a normal firefox.exe, then that *will* be easy to solve.
Assignee | ||
Comment 20•9 years ago
|
||
(In reply to Mark Hammond [:markh] from comment #19)
> (In reply to Armen Zambrano Gasparnian [:armenzg] from comment #17)
> > I started thinking as to why we hit this issue with FX ui tests and not with
> > desktop unittests.
> >
> > The reason boils down to this, when we generate "firefox-ui-update" binary
> > through python's console_scripts we generate an .exe which it always
> > triggers a UAC prompt.
> >
> > For desktop unittests we call a python script, hence, not triggering a UAC
> > prompt.
>
> I'm still missing some context, but my earlier comments were under the
> impression you were trying to call "Firefox%20Setup%2040.0b1.exe" and not
> have it prompt for UAC - I don't think there is an easy answer to that.
> However, desktop unit tests don't run that.
>
This is not the case.
We generate a binary called "firefox-ui-update.exe" through the console_scripts:
https://github.com/mozilla/firefox-ui-tests/blob/master/setup.py#L42
That triggers the UAC prompt.
> > --this-chunk 2 --appname=C:\slave\test\build\application\firefox\firefox.exe
>
> If your problem is that you are getting a UAC prompt running a normal
> firefox.exe, then that *will* be easy to solve.
The relevant part of that example is:
> C:\slave\test\build\venv\Scripts\python -u C:\slave\test\build\tests\mochitest\runtests.py
Since it shows that we call a python script instead of a generated .exe via console_scripts.
We don't have any UAC problems for Firefox desktop unit tests because we use that entry point.
Assignee | ||
Updated•9 years ago
|
Attachment #8653059 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8655499 -
Attachment is obsolete: true
Assignee | ||
Comment 21•9 years ago
|
||
We won't use this patch, however, we could grab the code from here and create a bootstrap script which generates a minimal venv for mozharness.
Assignee | ||
Comment 22•9 years ago
|
||
Green run on my repo/branch:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e08a06ee11be
Attachment #8656706 -
Flags: review?(hskupin)
Assignee | ||
Comment 23•9 years ago
|
||
The review request for chmanchester went under bug 1192309.
Assignee | ||
Comment 24•9 years ago
|
||
Comment on attachment 8656706 [details] [review]
PR - add scripts to start Firefox UI tests
Dealing with it in bug 1201668.
Attachment #8656706 -
Attachment is obsolete: true
Attachment #8656706 -
Flags: review?(hskupin)
Comment 25•9 years ago
|
||
Assignee | ||
Comment 26•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ef749ba572a4 <- Landed on top of whimboo's refactoring
Summary: Calling firefox-ui-update (script generated through console_scripts) on Windows trigger the UAC prompt → Calling firefox-ui-update (script generated through console_scripts) on Windows triggers the UAC prompt
Assignee | ||
Comment 27•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 28•9 years ago
|
||
Comment 29•9 years ago
|
||
Comment on attachment 8656600 [details] [diff] [review]
[poc] modified script that quickly generates a venv and installs the latest mozprocess
Review of attachment 8656600 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/mozharness/scripts/firefox_ui_updates.py
@@ +176,5 @@
> exit(1)
>
> + assert 'update_verify_config' in self.config or \
> + self.installer_url or self.installer_path, \
> + 'Either specify --update-verify-config, --installer-url or --installer-path.'
As changed this is invalid syntax and breaks the release update tests:
File "scripts/firefox_ui_tests/update_release.py", line 218
self.installer_url or self.installer_path),
^
SyntaxError: invalid syntax
I will file a follow-up bug for you.
Comment 30•9 years ago
|
||
Whereby I will fix it along with my patch on bug 1203155 if you don't mind. It's a very tiny fix, which I actually need to test my changes.
Updated•9 years ago
|
Product: Mozilla QA → Testing
You need to log in
before you can comment on or make changes to this bug.
Description
•