GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit b21127c7 authored by Alex Catarineu's avatar Alex Catarineu

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.
parent f87d747c
...@@ -826,7 +826,7 @@ sub marionette_run { ...@@ -826,7 +826,7 @@ sub marionette_run {
$test->{screenshots} = []; $test->{screenshots} = [];
my $screenshots_tmp = File::Temp::newdir('XXXXXX', DIR => $options->{tmpdir}); my $screenshots_tmp = File::Temp::newdir('XXXXXX', DIR => $options->{tmpdir});
$ENV{'MARIONETTE_SCREENSHOTS'} = winpath($screenshots_tmp); $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-unittest', winpath($result_file_txt),
'--log-html', winpath($result_file_html), '--log-html', winpath($result_file_html),
'--binary', ffbin_path($tbbinfos, $test), '--binary', ffbin_path($tbbinfos, $test),
......
...@@ -3,11 +3,8 @@ from setuptools import setup, find_packages ...@@ -3,11 +3,8 @@ from setuptools import setup, find_packages
PACKAGE_VERSION = '0.3' PACKAGE_VERSION = '0.3'
deps = [ deps = [
'marionette_harness == 4.3.0', 'marionette_harness == 5.0.0',
'marionette_driver == 2.5.0', 'marionette_driver == 3.0.0',
'mozfile == 1.2',
'mozinfo == 0.8',
'mozlog == 3.0',
] ]
setup(name='tor-browser-tests', setup(name='tor-browser-tests',
......
...@@ -5,6 +5,8 @@ use File::Copy; ...@@ -5,6 +5,8 @@ use File::Copy;
use IO::CaptureOutput qw(qxx); use IO::CaptureOutput qw(qxx);
use Cwd; use Cwd;
use English; use English;
use lib $FindBin::Bin;
use TBBTestSuite::Common qw(has_bin);
sub winpath { sub winpath {
return $_[0] unless $OSNAME eq 'cygwin'; return $_[0] unless $OSNAME eq 'cygwin';
...@@ -13,7 +15,7 @@ sub winpath { ...@@ -13,7 +15,7 @@ sub winpath {
return $res; 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"); my $virtenv_pefile_dir = winpath("$FindBin::Bin/virtualenv-pefile");
sub run { sub run {
...@@ -28,7 +30,7 @@ sub run_from_dir { ...@@ -28,7 +30,7 @@ sub run_from_dir {
return $res; return $res;
} }
my $virtualenv_cmd = 'virtualenv'; my $virtualenv_cmd = has_bin('virtualenv2') ? 'virtualenv2' : 'virtualenv';
my $bin = 'bin'; my $bin = 'bin';
my $lib = 'lib'; my $lib = 'lib';
if ($OSNAME eq 'cygwin') { if ($OSNAME eq 'cygwin') {
...@@ -45,13 +47,6 @@ unless (-d $virtenv_marionette_dir) { ...@@ -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', 'pip');
run("$virtenv_marionette_dir/$bin/pip", 'install', '--upgrade', 'setuptools'); run("$virtenv_marionette_dir/$bin/pip", 'install', '--upgrade', 'setuptools');
run_from_dir('marionette', "$virtenv_marionette_dir/$bin/python", 'setup.py', 'develop'); 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') { if ($OSNAME eq 'cygwin') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment