Francois Gouget : testbot/build: Trace the build commands to help developers analyze the logs.

Alexandre Julliard julliard at winehq.org
Wed Oct 10 14:52:51 CDT 2012


Module: tools
Branch: master
Commit: 122787dad633ab6023eeab15113906177b7b011d
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=122787dad633ab6023eeab15113906177b7b011d

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Oct 10 01:15:04 2012 +0200

testbot/build: Trace the build commands to help developers analyze the logs.

---

 testbot/bin/BuildSingleTest.pl |   48 +++++++++++++++++++++++++---------------
 testbot/bin/Reconfig.pl        |   24 ++++++++++----------
 2 files changed, 42 insertions(+), 30 deletions(-)

diff --git a/testbot/bin/BuildSingleTest.pl b/testbot/bin/BuildSingleTest.pl
index af28f88..07787d4 100755
--- a/testbot/bin/BuildSingleTest.pl
+++ b/testbot/bin/BuildSingleTest.pl
@@ -119,8 +119,9 @@ sub ApplyPatch
   if ($NeedAutoconf && ! $NeedConfigure)
   {
     InfoMsg "Running autoconf\n";
-    system("cd $DataDir/wine-git; autoconf --output configure configure.ac" .
-           ">> $LogDir/BuildSingleTest.log 2>&1");
+    system("( cd $DataDir/wine-git && set -x && " .
+           "  autoconf --output configure configure.ac " .
+           ") >>$LogDir/BuildSingleTest.log 2>&1");
     if ($? != 0)
     {
        LogMsg "Autoconf failed\n";
@@ -169,10 +170,9 @@ sub BuildTestExecutable
   {
     InfoMsg "Reconfigure $Bits-bit crossbuild\n";
     my $Host = ($Bits == 64 ? "x86_64-w64-mingw32" : "i686-pc-mingw32");
-    system("cd $DataDir/build-mingw$Bits && " .
-           "../wine-git/configure --host=$Host " .
-           "--with-wine-tools=../build-native --without-x --without-freetype " .
-           ">> $LogDir/BuildSingleTest.log 2>&1");
+    system("( cd $DataDir/build-mingw$Bits && set -x && " .
+           "  ../wine-git/configure --host=$Host --with-wine-tools=../build-native --without-x --without-freetype " .
+           ") >>$LogDir/BuildSingleTest.log 2>&1");
     if ($? != 0)
     {
       LogMsg "Reconfigure of $Bits-bit crossbuild failed\n";
@@ -183,15 +183,18 @@ sub BuildTestExecutable
   if ($NeedMakeInclude || $NeedConfigure)
   {
     InfoMsg "Recreating include/Makefile\n";
-    system("cd $DataDir/build-mingw${Bits}; ./config.status --file include/Makefile:Make.vars.in:include/Makefile.in >> $LogDir/BuildSingleTest.log 2>&1");
+    system("( cd $DataDir/build-mingw$Bits && set -x && " .
+           "  ./config.status --file include/Makefile:Make.vars.in:include/Makefile.in " .
+           ") >>$LogDir/BuildSingleTest.log 2>&1");
     if ($? != 0)
     {
       LogMsg "Recreation of include/Makefile failed\n";
       return !1;
     }
 
-    system("make -j$ncpus -C $DataDir/build-mingw${Bits}/include " .
-           ">> $LogDir/BuildSingleTest.log 2>&1");
+    system("( cd $DataDir/build-mingw$Bits && set -x && " .
+           "  make -j$ncpus include " .
+           ") >> $LogDir/BuildSingleTest.log 2>&1");
     if ($? != 0)
     {
       LogMsg "Make in include dir failed\n";
@@ -202,15 +205,18 @@ sub BuildTestExecutable
   if ($NeedImplib || $NeedConfigure)
   {
     InfoMsg "Rebuilding $BaseName import lib\n";
-    system("cd $DataDir/build-mingw${Bits}; ./config.status --file $PatchType/$BaseName/Makefile:Make.vars.in:$PatchType/$BaseName/Makefile.in >> $LogDir/BuildSingleTest.log 2>&1");
+    system("( cd $DataDir/build-mingw$Bits && set -x && " .
+           "  ./config.status --file $PatchType/$BaseName/Makefile:Make.vars.in:$PatchType/$BaseName/Makefile.in " .
+           ") >>$LogDir/BuildSingleTest.log 2>&1");
     if ($? != 0)
     {
       LogMsg "Unable to regenerate $PatchType/$BaseName/Makefile\n";
     }
     else
     {
-      system("make -j$ncpus -C $DataDir/build-mingw${Bits}/$PatchType/$BaseName " .
-             "lib$BaseName.a >> $LogDir/BuildSingleTest.log 2>&1");
+      system("( cd $DataDir/build-mingw$Bits && set -x && " .
+             "  make -j$ncpus -C $PatchType/$BaseName lib$BaseName.a " .
+             ") >>$LogDir/BuildSingleTest.log 2>&1");
       if ($? != 0)
       {
         InfoMsg "Make of import library failed\n";
@@ -221,7 +227,9 @@ sub BuildTestExecutable
   if ($NeedMakefile || $NeedConfigure)
   {
     InfoMsg "Recreating tests/Makefile\n";
-    system("cd $DataDir/build-mingw${Bits}; ./config.status --file $PatchType/$BaseName/tests/Makefile:Make.vars.in:$PatchType/$BaseName/tests/Makefile.in >> $LogDir/BuildSingleTest.log 2>&1");
+    system("( cd $DataDir/build-mingw$Bits && set -x && " .
+           "  ./config.status --file $PatchType/$BaseName/tests/Makefile:Make.vars.in:$PatchType/$BaseName/tests/Makefile.in " .
+           ") >>$LogDir/BuildSingleTest.log 2>&1");
     if ($? != 0)
     {
       LogMsg "Recreation of tests/Makefile failed\n";
@@ -232,7 +240,9 @@ sub BuildTestExecutable
   if ($NeedBuildDeps)
   {
     InfoMsg "Making build dependencies\n";
-    system("cd $DataDir/build-mingw${Bits}; make -j$ncpus __builddeps__ >> $LogDir/BuildSingleTest.log 2>&1");
+    system("( cd $DataDir/build-mingw$Bits && set -x && " .
+           "  make -j$ncpus __builddeps__ " .
+           ") >>$LogDir/BuildSingleTest.log 2>&1");
     if ($? != 0)
     {
       LogMsg "Making build dependencies failed\n";
@@ -240,23 +250,25 @@ sub BuildTestExecutable
     }
   }
 
-  my $TestsDir = "$DataDir/build-mingw${Bits}/$PatchType/$BaseName/tests";
+  my $TestsDir = "$PatchType/$BaseName/tests";
   my $TestExecutable = "$TestsDir/$BaseName";
   if ($PatchType eq "programs")
   {
     $TestExecutable .= ".exe";
   }
   $TestExecutable .= "_test.exe";
-  unlink($TestExecutable);
+  unlink("$DataDir/build-mingw${Bits}/$TestExecutable");
  
   InfoMsg "Making test executable\n";
-  system("make -j$ncpus -C $TestsDir >> $LogDir/BuildSingleTest.log 2>&1");
+  system("( cd $DataDir/build-mingw$Bits && set -x && " .
+         "  make -j$ncpus -C $TestsDir " .
+         ") >>$LogDir/BuildSingleTest.log 2>&1");
   if ($? != 0)
   {
     LogMsg "Make failed\n";
     return !1;
   }
-  if (! -f $TestExecutable)
+  if (! -f "$DataDir/build-mingw${Bits}/$TestExecutable")
   {
     LogMsg "Make didn't produce a $TestExecutable file\n";
     return !1;
diff --git a/testbot/bin/Reconfig.pl b/testbot/bin/Reconfig.pl
index fe789f0..3b60abd 100755
--- a/testbot/bin/Reconfig.pl
+++ b/testbot/bin/Reconfig.pl
@@ -78,12 +78,12 @@ sub CountCPUs()
 sub BuildNative
 {
   mkdir "$DataDir/build-native" if (! -d "$DataDir/build-native");
-  system("cd $DataDir/build-native && " .
-         "rm -rf * && " .
-         "../wine-git/configure --enable-win64 --without-x --without-freetype " .
-         ">> $LogDir/Reconfig.log 2>&1 && " .
-         "make -j$ncpus depend >> $LogDir/Reconfig.log 2>&1 && " .
-         "make -j$ncpus __tooldeps__ >> $LogDir/Reconfig.log 2>&1");
+  system("( cd $DataDir/build-native && set -x && " .
+         "  rm -rf * && " .
+         "  ../wine-git/configure --enable-win64 --without-x --without-freetype && " .
+         "  make -j$ncpus depend && " .
+         "  make -j$ncpus __tooldeps__ " .
+         ") >>$LogDir/Reconfig.log 2>&1");
 
   if ($? != 0)
   {
@@ -100,12 +100,12 @@ sub BuildCross
 
   my $Host = ($Bits == 64 ? "x86_64-w64-mingw32" : "i686-w64-mingw32");
   mkdir "$DataDir/build-mingw$Bits" if (! -d "$DataDir/build-mingw$Bits");
-  system("cd $DataDir/build-mingw$Bits && " .
-         "rm -rf * && " .
-         "../wine-git/configure --host=$Host --with-wine-tools=../build-native " .
-         "--without-x --without-freetype >> $LogDir/Reconfig.log 2>&1 && " .
-         "make -j$ncpus depend >> $LogDir/Reconfig.log 2>&1 && " .
-         "make -j$ncpus programs/winetest >> $LogDir/Reconfig.log 2>&1");
+  system("( cd $DataDir/build-mingw$Bits && set -x && " .
+         "  rm -rf * && " .
+         "  ../wine-git/configure --host=$Host --with-wine-tools=../build-native --without-x --without-freetype && " .
+         "  make -j$ncpus depend  && " .
+         "  make -j$ncpus programs/winetest " .
+         ") >>$LogDir/Reconfig.log 2>&1");
   if ($? != 0)
   {
     LogMsg "Build cross ($Bits bits) failed\n";




More information about the wine-cvs mailing list