[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser-bundle-testsuite/master] Bug 25101: Generate incremental mars for nightly builds
commit 4261c714139e0d9896d17c92af54747f34bd9f9b
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date: Tue Dec 10 21:13:10 2019 +0100
Bug 25101: Generate incremental mars for nightly builds
---
TBBTestSuite/TestSuite/TorBrowserBuild.pm | 58 +++++++++++++++++++++++++++++++
tmpl/details_make_incrementals.html | 1 +
2 files changed, 59 insertions(+)
diff --git a/TBBTestSuite/TestSuite/TorBrowserBuild.pm b/TBBTestSuite/TestSuite/TorBrowserBuild.pm
index c52d5c4..d391bac 100644
--- a/TBBTestSuite/TestSuite/TorBrowserBuild.pm
+++ b/TBBTestSuite/TestSuite/TorBrowserBuild.pm
@@ -3,9 +3,11 @@ package TBBTestSuite::TestSuite::TorBrowserBuild;
use strict;
use parent 'TBBTestSuite::TestSuite::RBMBuild';
+use TBBTestSuite::Common qw(run_to_file);
use TBBTestSuite::GitRepo;
use File::Copy;
use IO::CaptureOutput qw(capture_exec);
+use Path::Tiny;
sub description {
'Tor Browser Build';
@@ -15,6 +17,13 @@ sub type {
'tor-browser_build';
};
+sub test_types {
+ my $self = shift;
+ my $res = $self->SUPER::test_types();
+ $res->{make_incrementals} = \&make_incrementals;
+ return $res;
+}
+
sub set_tests {
my ($testsuite) = @_;
$testsuite->{tests} = [
@@ -32,6 +41,12 @@ sub set_tests {
publish_dir => 'nightly-linux-x86_64',
},
{
+ name => 'incrementals-nightly-linux-x86_64',
+ descr => 'create incrementals for tor-browser nightly linux-x86_64',
+ type => 'make_incrementals',
+ publish_dir => 'nightly-linux-x86_64',
+ },
+ {
name => 'nightly-linux-i686',
descr => 'build tor-browser nightly linux-i686',
type => 'rbm_build',
@@ -44,6 +59,12 @@ sub set_tests {
publish_dir => 'nightly-linux-i686',
},
{
+ name => 'incrementals-nightly-linux-i686',
+ descr => 'create incrementals for tor-browser nightly linux-i686',
+ type => 'make_incrementals',
+ publish_dir => 'nightly-linux-i686',
+ },
+ {
name => 'nightly-windows-i686',
descr => 'build tor-browser nightly windows-i686',
type => 'rbm_build',
@@ -56,6 +77,12 @@ sub set_tests {
publish_dir => 'nightly-windows-i686',
},
{
+ name => 'incrementals-nightly-windows-i686',
+ descr => 'create incrementals for tor-browser nightly windows-i686',
+ type => 'make_incrementals',
+ publish_dir => 'nightly-windows-i686',
+ },
+ {
name => 'nightly-windows-x86_64',
descr => 'build tor-browser nightly windows-x86_64',
type => 'rbm_build',
@@ -68,6 +95,12 @@ sub set_tests {
publish_dir => 'nightly-windows-x86_64',
},
{
+ name => 'incrementals-nightly-windows-x86_64',
+ descr => 'create incrementals for tor-browser nightly windows-x86_64',
+ type => 'make_incrementals',
+ publish_dir => 'nightly-windows-x86_64',
+ },
+ {
name => 'nightly-osx-x86_64',
descr => 'build tor-browser nightly osx-x86_64',
type => 'rbm_build',
@@ -80,6 +113,12 @@ sub set_tests {
publish_dir => 'nightly-osx-x86_64',
},
{
+ name => 'incrementals-nightly-osx-x86_64',
+ descr => 'create incrementals for tor-browser nightly osx-x86_64',
+ type => 'make_incrementals',
+ publish_dir => 'nightly-osx-x86_64',
+ },
+ {
name => 'nightly-android-armv7',
descr => 'build tor-browser nightly android-armv7',
type => 'rbm_build',
@@ -130,6 +169,25 @@ sub set_tests {
];
}
+sub make_incrementals {
+ my ($testsuite, $test) = @_;
+ $test->{results}{success} = 0;
+ mkdir 'nightly' unless -d 'nightly';
+ # Clean the nightly directory
+ foreach my $subdir (path('nightly')->children) {
+ unlink $subdir if -l $subdir;
+ }
+ foreach my $builddir (path($testsuite->{publish_dir} . '/..')->children) {
+ if (-f "$builddir/$test->{publish_dir}/sha256sums-unsigned-build.txt") {
+ symlink("$builddir/$test->{publish_dir}", 'nightly/' . $builddir->basename);
+ }
+ }
+ my @cmd = ('make', 'incrementals-nightly');
+ run_to_file("$testsuite->{'results-dir'}/$test->{name}.build.txt", @cmd)
+ or return;
+ $test->{results}{success} = 1;
+}
+
sub pre_tests {
my ($tbbinfos) = @_;
my $gr = TBBTestSuite::GitRepo->new({
diff --git a/tmpl/details_make_incrementals.html b/tmpl/details_make_incrementals.html
new file mode 120000
index 0000000..d9bb49c
--- /dev/null
+++ b/tmpl/details_make_incrementals.html
@@ -0,0 +1 @@
+details_rbm_build.html
\ No newline at end of file
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits