Unverified Commit dc9bd24a authored by boklm's avatar boklm
Browse files

Add a clean_browserdir option

If this option is set to true (the default), the browser source dir is
cleaned before doing the checkout.

This option is mainly useful for testing/debugging the testsuite.
parent a5e8883a
......@@ -9,6 +9,7 @@ use File::Copy;
use File::Slurp;
use TBBTestSuite::Common qw(exit_error get_nbcpu run_to_file);
use TBBTestSuite::Reports qw(load_report);
use TBBTestSuite::Options qw($options);
my $test_types = {
xpcshell => \&xpcshell_test,
......@@ -45,8 +46,10 @@ sub get_tbbinfos {
sub pre_tests {
my ($tbbinfos) = @_;
chdir $tbbinfos->{browserdir};
system('git', 'clean', '-fxd');
system('git', 'reset', '--hard');
if ($options->{clean_browserdir}) {
system('git', 'clean', '-fxd');
system('git', 'reset', '--hard');
}
system('git', 'checkout', $tbbinfos->{commit}) == 0
or exit_error "Error checking out $tbbinfos->{commit}";
my ($out, $err, $success) = capture_exec('git', 'show', '-s',
......
......@@ -25,6 +25,7 @@ my %default_options = (
selenium => $OSNAME ne 'cygwin',
starttor => 1,
gpgcheck => 1,
clean_browserdir => 1,
keyring => 'erinn.gpg',
'tor-control-port' => '9551',
'tor-socks-port' => '9550',
......
Supports Markdown
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