boklm pushed to branch main at The Tor Project / Applications /
tor-browser-bundle-testsuite
Commits:
dae2420a by Nicolas Vigier at 2025-09-30T16:29:01+02:00
Bug 40088: Add link to build files for failed builds
- - - - -
ad71b063 by Nicolas Vigier at 2025-10-02T15:02:56+02:00
Bug 40087: Run make submodule-update/fetch/clean as a separate test
Instead of running those commands in pre_tests, run them as a separate
test, so that they can fail without preventing other tests from running.
- - - - -
4 changed files:
- TBBTestSuite/TestSuite/TorBrowserBuild.pm
- config/tb-build-06.torproject.org
- + tmpl/details_make_fetch_clean.html
- tmpl/details_rbm_build.html
Changes:
=====================================
TBBTestSuite/TestSuite/TorBrowserBuild.pm
=====================================
@@ -21,12 +21,18 @@ sub test_types {
my $self = shift;
my $res = $self->SUPER::test_types();
$res->{make_incrementals} = \&make_incrementals;
+ $res->{make_fetch_clean} = \&make_fetch_clean;
return $res;
}
sub set_tests {
my ($testsuite) = @_;
$testsuite->{tests} = [
+ {
+ name => 'make_fetch_clean',
+ descr => 'run make submodule-update, make fetch, make clean',
+ type => 'make_fetch_clean',
+ },
# Tor Browser Nightly
{
name => 'torbrowser-nightly-linux-x86_64',
@@ -333,6 +339,16 @@ sub make_incrementals {
$test->{results}{success} = 1;
}
+sub make_fetch_clean {
+ my ($testsuite, $test) = @_;
+ $test->{results}{success} = 0;
+ foreach my $cmd (('submodule-update', 'fetch', 'clean')) {
+ run_to_file("$testsuite->{'results-dir'}/$test->{name}.$cmd.txt",
'make', $cmd)
+ or return;
+ }
+ $test->{results}{success} = 1;
+}
+
sub pre_tests {
my ($tbbinfos) = @_;
my $gr = TBBTestSuite::GitRepo->new({
@@ -344,14 +360,6 @@ sub pre_tests {
chdir $gr->clone_dir();
copy($tbbinfos->{rbm_local_conf}, $gr->clone_dir() . '/rbm.local.conf')
if $tbbinfos->{rbm_local_conf};
- my @clean = ('clean') if $tbbinfos->{make_clean};
- foreach my $cmd (('submodule-update', 'fetch', @clean)) {
- my ($out, $err, $success) = capture_exec('make', $cmd);
- if (!$success) {
- $tbbinfos->{pre_tests_error} = "Error running make
$cmd:\n$out\n$err";
- return;
- }
- }
if ($tbbinfos->{tbb_version}) {
$ENV{TORBROWSER_NIGHTLY_VERSION} = $tbbinfos->{tbb_version};
}
=====================================
config/tb-build-06.torproject.org
=====================================
@@ -37,7 +37,6 @@ my $testsuite =
TBBTestSuite::TestSuite::TorBrowserBuild->new({
publish_dir => "$builds_dir_root/tor-browser-builds/$tbb_version",
publish_url =>
"https://nightlies.tbb.torproject.org/nightly-builds/tor-browser-builds/$tbb_version",
rbm_local_conf =>
"$FindBin::Bin/rbm-config/tb-build-06.torproject.org.rbm.local.conf",
- make_clean => 1,
});
my %res = (
=====================================
tmpl/details_make_fetch_clean.html
=====================================
@@ -0,0 +1,5 @@
+<ul>
+[% FOREACH make_cmd = [ 'submodule-update', 'fetch', 'clean' ] %]
+ <li><a href="results-[% tbbfile %]/[% test.name %].[% make_cmd
%].txt">make [% make_cmd %] logs</a></li>
+[% END %]
+</ul>
=====================================
tmpl/details_rbm_build.html
=====================================
@@ -1,6 +1,6 @@
<ul>
<li><a href="results-[% tbbfile %]/[% test.name %].build.txt">build
logs</a></li>
-[% IF test.results.success && tbbfiles.$tbbfile.publish_url %]
+[% IF tbbfiles.$tbbfile.publish_url %]
<li><a href="[% tbbfiles.$tbbfile.publish_url %]/[% test.publish_dir
%]">build files</a></li>
[% END %]
</ul>
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser-bundle-testsuite/-/compare/dd050c96af4ef2d4b26d3fa29f2394eb24b6609d...ad71b06328b94705d10c60399f11bc4aeb6430b5
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser-bundle-testsuite/-/compare/dd050c96af4ef2d4b26d3fa29f2394eb24b6609d...ad71b06328b94705d10c60399f11bc4aeb6430b5
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tor-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]