From aac2c4a08004e63665729ef1818e31baf4aca829 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 18 Aug 2020 23:29:24 -0700 Subject: [PATCH] Trigger full reconfigures when requested. --- tools/buildbot/bootstrap.pl | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/tools/buildbot/bootstrap.pl b/tools/buildbot/bootstrap.pl index e1494f46..dddb71d3 100755 --- a/tools/buildbot/bootstrap.pl +++ b/tools/buildbot/bootstrap.pl @@ -23,8 +23,15 @@ chdir(Build::PathFormat('..')); #Get the source path. our ($root) = getcwd(); -my $reconf = 0; - +if (-f 'tools/buildbot/trigger_full_rebuild') { + my $trigger_mtime = (stat 'tools/buildbot/trigger_full_rebuild')[9]; + if (-f 'OUTPUT/.ambuild2/graph') { + my $graph_mtime = (stat 'OUTPUT/.ambuild2/graph')[9]; + if ($trigger_mtime > $graph_mtime) { + rmtree('OUTPUT'); + } + } +} if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) { rmtree('OUTPUT'); mkdir('OUTPUT') or die("Failed to create output folder: $!\n"); @@ -75,15 +82,4 @@ if ($? != 0) { die("Could not configure: $!\n"); } -sub IsNewer -{ - my ($file, $time) = (@_); - - my @s = stat($file); - my $mtime = $s[9]; - return $mtime > $time; -} - exit(0); - -