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.

TorBrowserBuild.pm 3.54 KB
Newer Older
1 2 3 4 5 6
package TBBTestSuite::TestSuite::TorBrowserBuild;

use strict;
use parent 'TBBTestSuite::TestSuite::RBMBuild';

use TBBTestSuite::GitRepo;
7
use File::Copy;
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

sub description {
    'Tor Browser Build';
}

sub type {
    'tor-browser_build';
};

sub set_tests {
    my ($testsuite) = @_;
    $testsuite->{tests} = [
        # Nightly
        {
            name  => 'nightly-linux-x86_64',
            descr => 'build tor-browser nightly linux-x86_64',
            type  => 'rbm_build',
            project => 'release',
            targets => [
27
                'noversiondir',
28 29 30 31 32 33 34 35 36 37 38
                'nightly',
                'torbrowser-linux-x86_64',
            ],
            publish_dir => 'nightly-linux-x86_64',
        },
        {
            name  => 'nightly-linux-i686',
            descr => 'build tor-browser nightly linux-i686',
            type  => 'rbm_build',
            project => 'release',
            targets => [
39
                'noversiondir',
40 41 42 43 44 45 46 47 48 49 50
                'nightly',
                'torbrowser-linux-i686',
            ],
            publish_dir => 'nightly-linux-i686',
        },
        {
            name  => 'nightly-windows-i686',
            descr => 'build tor-browser nightly windows-i686',
            type  => 'rbm_build',
            project => 'release',
            targets => [
51
                'noversiondir',
52 53 54 55 56
                'nightly',
                'torbrowser-windows-i686',
            ],
            publish_dir => 'nightly-windows-i686',
        },
57 58 59 60 61 62 63 64 65 66 67 68
        {
            name  => 'nightly-windows-x86_64',
            descr => 'build tor-browser nightly windows-x86_64',
            type  => 'rbm_build',
            project => 'release',
            targets => [
                'noversiondir',
                'nightly',
                'torbrowser-windows-x86_64',
            ],
            publish_dir => 'nightly-windows-x86_64',
        },
69 70 71 72 73 74
        {
            name  => 'nightly-osx-x86_64',
            descr => 'build tor-browser nightly osx-x86_64',
            type  => 'rbm_build',
            project => 'release',
            targets => [
75
                'noversiondir',
76 77 78 79 80
                'nightly',
                'torbrowser-osx-x86_64',
            ],
            publish_dir => 'nightly-osx-x86_64',
        },
81 82 83 84 85 86 87 88 89 90 91 92
        {
            name  => 'nightly-android-armv7',
            descr => 'build tor-browser nightly android-armv7',
            type  => 'rbm_build',
            project => 'release',
            targets => [
                'noversiondir',
                'nightly',
                'torbrowser-android-armv7',
            ],
            publish_dir => 'nightly-android-armv7',
        },
93 94 95 96 97 98 99 100 101 102 103 104
        {
            name  => 'nightly-android-x86',
            descr => 'build tor-browser nightly android-x86',
            type  => 'rbm_build',
            project => 'release',
            targets => [
                'noversiondir',
                'nightly',
                'torbrowser-android-x86',
            ],
            publish_dir => 'nightly-android-x86',
        },
105 106 107 108 109 110 111
    ];
}

sub pre_tests {
    my ($tbbinfos) = @_;
    my $gr = TBBTestSuite::GitRepo->new({
            name => 'tor-browser-build',
112
            git_url => 'https://git.torproject.org/builders/tor-browser-build.git',
113 114
        });
    $gr->clone_fetch;
115
    $gr->cmd('git', 'checkout', 'master');
116
    chdir $gr->clone_dir();
117 118
    copy($tbbinfos->{rbm_local_conf}, $gr->clone_dir() . '/rbm.local.conf')
            if $tbbinfos->{rbm_local_conf};
119 120
    system('make', 'submodule-update');
    system('make', 'fetch');
121
    system('make', 'clean') if $tbbinfos->{make_clean};
122 123 124
}

1;