boklm pushed to branch main at The Tor Project / Applications / tor-browser-bundle-testsuite

Commits:

4 changed files:

Changes:

  • TBBTestSuite/TestSuite/TorBrowserBuild.pm
    ... ... @@ -21,12 +21,18 @@ sub test_types {
    21 21
         my $self = shift;
    
    22 22
         my $res = $self->SUPER::test_types();
    
    23 23
         $res->{make_incrementals} = \&make_incrementals;
    
    24
    +    $res->{make_fetch_clean} = \&make_fetch_clean;
    
    24 25
         return $res;
    
    25 26
     }
    
    26 27
     
    
    27 28
     sub set_tests {
    
    28 29
         my ($testsuite) = @_;
    
    29 30
         $testsuite->{tests} = [
    
    31
    +        {
    
    32
    +            name  => 'make_fetch_clean',
    
    33
    +            descr => 'run make submodule-update, make fetch, make clean',
    
    34
    +            type  => 'make_fetch_clean',
    
    35
    +        },
    
    30 36
             # Tor Browser Nightly
    
    31 37
             {
    
    32 38
                 name  => 'torbrowser-nightly-linux-x86_64',
    
    ... ... @@ -333,6 +339,16 @@ sub make_incrementals {
    333 339
         $test->{results}{success} = 1;
    
    334 340
     }
    
    335 341
     
    
    342
    +sub make_fetch_clean {
    
    343
    +    my ($testsuite, $test) = @_;
    
    344
    +    $test->{results}{success} = 0;
    
    345
    +    foreach my $cmd (('submodule-update', 'fetch', 'clean')) {
    
    346
    +        run_to_file("$testsuite->{'results-dir'}/$test->{name}.$cmd.txt", 'make', $cmd)
    
    347
    +            or return;
    
    348
    +    }
    
    349
    +    $test->{results}{success} = 1;
    
    350
    +}
    
    351
    +
    
    336 352
     sub pre_tests {
    
    337 353
         my ($tbbinfos) = @_;
    
    338 354
         my $gr = TBBTestSuite::GitRepo->new({
    
    ... ... @@ -344,14 +360,6 @@ sub pre_tests {
    344 360
         chdir $gr->clone_dir();
    
    345 361
         copy($tbbinfos->{rbm_local_conf}, $gr->clone_dir() . '/rbm.local.conf')
    
    346 362
                 if $tbbinfos->{rbm_local_conf};
    
    347
    -    my @clean = ('clean') if $tbbinfos->{make_clean};
    
    348
    -    foreach my $cmd (('submodule-update', 'fetch', @clean)) {
    
    349
    -        my ($out, $err, $success) = capture_exec('make', $cmd);
    
    350
    -        if (!$success) {
    
    351
    -            $tbbinfos->{pre_tests_error} = "Error running make $cmd:\n$out\n$err";
    
    352
    -            return;
    
    353
    -        }
    
    354
    -    }
    
    355 363
         if ($tbbinfos->{tbb_version}) {
    
    356 364
             $ENV{TORBROWSER_NIGHTLY_VERSION} = $tbbinfos->{tbb_version};
    
    357 365
         }
    

  • config/tb-build-06.torproject.org
    ... ... @@ -37,7 +37,6 @@ my $testsuite = TBBTestSuite::TestSuite::TorBrowserBuild->new({
    37 37
             publish_dir => "$builds_dir_root/tor-browser-builds/$tbb_version",
    
    38 38
             publish_url => "https://nightlies.tbb.torproject.org/nightly-builds/tor-browser-builds/$tbb_version",
    
    39 39
             rbm_local_conf => "$FindBin::Bin/rbm-config/tb-build-06.torproject.org.rbm.local.conf",
    
    40
    -        make_clean => 1,
    
    41 40
         });
    
    42 41
     
    
    43 42
     my %res = (
    

  • tmpl/details_make_fetch_clean.html
    1
    +<ul>
    
    2
    +[% FOREACH make_cmd = [ 'submodule-update', 'fetch', 'clean' ] %]
    
    3
    +    <li><a href="results-[% tbbfile %]/[% test.name %].[% make_cmd %].txt">make [% make_cmd %] logs</a></li>
    
    4
    +[% END %]
    
    5
    +</ul>

  • tmpl/details_rbm_build.html
    1 1
     <ul>
    
    2 2
         <li><a href="results-[% tbbfile %]/[% test.name %].build.txt">build logs</a></li>
    
    3
    -[% IF test.results.success && tbbfiles.$tbbfile.publish_url %]
    
    3
    +[% IF tbbfiles.$tbbfile.publish_url %]
    
    4 4
         <li><a href="[% tbbfiles.$tbbfile.publish_url %]/[% test.publish_dir %]">build files</a></li>
    
    5 5
     [% END %]
    
    6 6
     </ul>