From a55b0002738bb87cc0df8a554d50d36f97dc1442 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 30 Dec 2013 17:51:01 -0500 Subject: [PATCH] Switch buildbot scripts to AMBuild 2 (bug 5997 part 15, r=ds). --- tools/buildbot/bootstrap.pl | 31 ++++--------------------------- tools/buildbot/startbuild.pl | 10 ++++++---- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/tools/buildbot/bootstrap.pl b/tools/buildbot/bootstrap.pl index 3a30682a..82a25efa 100755 --- a/tools/buildbot/bootstrap.pl +++ b/tools/buildbot/bootstrap.pl @@ -19,27 +19,7 @@ our ($root) = getcwd(); my $reconf = 0; -#Create output folder if it doesn't exist. -if (!(-d 'OUTPUT')) { - $reconf = 1; -} else { - if (-f 'OUTPUT/sentinel') { - my @s = stat('OUTPUT/sentinel'); - my $mtime = $s[9]; - my @files = ('build/pushbuild.txt', 'build/AMBuildScript', 'build/product.version'); - my ($i); - for ($i = 0; $i <= $#files; $i++) { - if (IsNewer($files[$i], $mtime)) { - $reconf = 1; - last; - } - } - } else { - $reconf = 1; - } -} - -if ($reconf) { +if (!(-f 'OUTPUT/.ambuild2/graph') || !(-f 'OUTPUT/.ambuild2/vars')) { rmtree('OUTPUT'); mkdir('OUTPUT') or die("Failed to create output folder: $!\n"); chdir('OUTPUT'); @@ -47,21 +27,18 @@ if ($reconf) { $argn = $#ARGV + 1; print "Attempting to reconfigure...\n"; if ($argn > 0 && $^O !~ /MSWin/) { - $result = `CC=$ARGV[0] CXX=$ARGV[0] python3 ../build/configure.py --enable-optimize`; + $result = `CC=$ARGV[0] CXX=$ARGV[0] python ../build/configure.py --enable-optimize`; } else { if ($^O =~ /MSWin/) { - $result = `C:\\Python32\\Python.exe ..\\build\\configure.py --enable-optimize`; + $result = `C:\\Python27\\Python.exe ..\\build\\configure.py --enable-optimize`; } else { - $result = `CC=clang CXX=clang python3 ../build/configure.py --enable-optimize`; + $result = `CC=clang CXX=clang python ../build/configure.py --enable-optimize`; } } print "$result\n"; if ($? != 0) { die("Could not configure: $!\n"); } - open(FILE, '>sentinel'); - print FILE "this is nothing.\n"; - close(FILE); } sub IsNewer diff --git a/tools/buildbot/startbuild.pl b/tools/buildbot/startbuild.pl index 7d6a3128..712ae630 100755 --- a/tools/buildbot/startbuild.pl +++ b/tools/buildbot/startbuild.pl @@ -10,12 +10,14 @@ require 'helpers.pm'; chdir('../../../OUTPUT'); -if ($^O eq "linux" || $^O eq "darwin") { - system("python3 build.py 2>&1"); -} else { - system("C:\\Python31\\python.exe build.py 2>&1"); +my $argn = $#ARGV + 1; +if ($argn > 0) { + $ENV{CC} = $ARGV[0]; + $ENV{CXX} = $ARGV[0]; } +system("ambuild --no-color 2>&1"); + if ($? != 0) { die "Build failed: $!\n";