browser-unit 1.22 KB
Newer Older
boklm's avatar
boklm committed
1
2
3
4
5
6
7
8
9
# vim: filetype=perl expandtab

use strict;
use FindBin;
use TBBTestSuite::Common;
use TBBTestSuite::BrowserUnitTests;
use TBBTestSuite::BrowserGit qw(git_clone_fetch get_commits_by_branch
                                parent_commit);

10
my $torbrowser_branch = 'tor-browser-24.8.0esr-3.x-1';
boklm's avatar
boklm committed
11
my $esr_branch = 'esr24';
12
my $testsuite_version = '1';
boklm's avatar
boklm committed
13
14
15
16

sub commit_to_name {
    my ($commit) = @_;
    $commit = substr $commit, 0, 20;
17
    return ("browser-$testsuite_version-$commit", "browser-$commit");
boklm's avatar
boklm committed
18
19
20
21
22
23
24
25
}

git_clone_fetch;

my @commits = get_commits_by_branch($torbrowser_branch, $esr_branch);

my %res = (
    args => [],
boklm's avatar
boklm committed
26
    'reports-url' => 'http://93.95.228.164/reports/',
27
    tags => [ $torbrowser_branch ],
boklm's avatar
boklm committed
28
);
29
my $previous;
boklm's avatar
boklm committed
30
for my $commit (reverse @commits) {
31
32
33
34
35
    my ($name, $fname) = commit_to_name($commit);
    if (-d "$options->{'reports-dir'}/r/$name") {
        $previous = [ $name, $fname ];
        next;
    }
boklm's avatar
boklm committed
36
37
38
39
    $res{name} = $name;
    my $tbbinfos = TBBTestSuite::BrowserUnitTests::get_tbbinfos({
            browserdir => $TBBTestSuite::BrowserGit::clone_dir,
            commit => substr($commit, 0, 20),
40
            $previous ? (parent_results => $previous) : (),
boklm's avatar
boklm committed
41
42
43
44
45
46
        });
    $res{args} = [ $tbbinfos ],
    return %res;
}

%res;