commit b21127c7a42e0855ef56cf70c777e0adc451cc60 Author: Alex Catarineu acat@torproject.org Date: Mon May 11 14:00:37 2020 +0200
Bug 32537: Update marionette version
Also check for virtualenv2, as in some systems virtualenv is the Python3 one, and remove code for https://bugzilla.mozilla.org/show_bug.cgi?id=1345274 workaround. --- TBBTestSuite/TestSuite/BrowserBundleTests.pm | 2 +- marionette/setup.py | 7 ++----- setup-virtualenv | 13 ++++--------- 3 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/TBBTestSuite/TestSuite/BrowserBundleTests.pm b/TBBTestSuite/TestSuite/BrowserBundleTests.pm index cf580f0..44c800e 100644 --- a/TBBTestSuite/TestSuite/BrowserBundleTests.pm +++ b/TBBTestSuite/TestSuite/BrowserBundleTests.pm @@ -826,7 +826,7 @@ sub marionette_run { $test->{screenshots} = []; my $screenshots_tmp = File::Temp::newdir('XXXXXX', DIR => $options->{tmpdir}); $ENV{'MARIONETTE_SCREENSHOTS'} = winpath($screenshots_tmp); - system(xvfb_run($test), "$FindBin::Bin/virtualenv-marionette-4.3.0/$bin/tor-browser-tests", + system(xvfb_run($test), "$FindBin::Bin/virtualenv-marionette-5.0.0/$bin/tor-browser-tests", '--log-unittest', winpath($result_file_txt), '--log-html', winpath($result_file_html), '--binary', ffbin_path($tbbinfos, $test), diff --git a/marionette/setup.py b/marionette/setup.py index 13970e8..78f4522 100644 --- a/marionette/setup.py +++ b/marionette/setup.py @@ -3,11 +3,8 @@ from setuptools import setup, find_packages PACKAGE_VERSION = '0.3'
deps = [ - 'marionette_harness == 4.3.0', - 'marionette_driver == 2.5.0', - 'mozfile == 1.2', - 'mozinfo == 0.8', - 'mozlog == 3.0', + 'marionette_harness == 5.0.0', + 'marionette_driver == 3.0.0', ]
setup(name='tor-browser-tests', diff --git a/setup-virtualenv b/setup-virtualenv index b3a412f..f0c6288 100755 --- a/setup-virtualenv +++ b/setup-virtualenv @@ -5,6 +5,8 @@ use File::Copy; use IO::CaptureOutput qw(qxx); use Cwd; use English; +use lib $FindBin::Bin; +use TBBTestSuite::Common qw(has_bin);
sub winpath { return $_[0] unless $OSNAME eq 'cygwin'; @@ -13,7 +15,7 @@ sub winpath { return $res; }
-my $virtenv_marionette_dir = winpath("$FindBin::Bin/virtualenv-marionette-4.3.0"); +my $virtenv_marionette_dir = winpath("$FindBin::Bin/virtualenv-marionette-5.0.0"); my $virtenv_pefile_dir = winpath("$FindBin::Bin/virtualenv-pefile");
sub run { @@ -28,7 +30,7 @@ sub run_from_dir { return $res; }
-my $virtualenv_cmd = 'virtualenv'; +my $virtualenv_cmd = has_bin('virtualenv2') ? 'virtualenv2' : 'virtualenv'; my $bin = 'bin'; my $lib = 'lib'; if ($OSNAME eq 'cygwin') { @@ -45,13 +47,6 @@ unless (-d $virtenv_marionette_dir) { run("$virtenv_marionette_dir/$bin/pip", 'install', '--upgrade', 'pip'); run("$virtenv_marionette_dir/$bin/pip", 'install', '--upgrade', 'setuptools'); run_from_dir('marionette', "$virtenv_marionette_dir/$bin/python", 'setup.py', 'develop'); - # Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1345274 - my $sitepackage = 'site-packages/marionette_harness-4.3.0-py2.7.egg/marionette_harness/runner/'; - my $marionette_runner_dir = "$virtenv_marionette_dir/$lib/python2.7/$sitepackage"; - $marionette_runner_dir = "$virtenv_marionette_dir/$lib/$sitepackage" - unless -d $marionette_runner_dir; - copy "$FindBin::Bin/data/marionette_certs/test.cert", $marionette_runner_dir; - copy "$FindBin::Bin/data/marionette_certs/test.key", $marionette_runner_dir; }
if ($OSNAME eq 'cygwin') {
tbb-commits@lists.torproject.org