Use new symbolic links to latest candidate release/beta for download. Execute (some) tests with dispMUA enabled. download_builds
authorjoachim
Sun, 25 Sep 2011 02:04:01 +0200
branchdownload_builds
changeset 291 cbe8e186f5a31fdb2f4891fe1226eade77e48a63
parent 290 a03ffbcc53f3514564e1698c633587e52d131e7a
child 292 a98c78dede606485dbbf1d611e8976248a586c98
push id34
push userJoachim.Herb@gmx.de
push dateSun, 25 Sep 2011 00:07:38 +0000
Use new symbolic links to latest candidate release/beta for download. Execute (some) tests with dispMUA enabled.
test/executeTests.pl
test/testapps.csv
--- a/test/executeTests.pl
+++ b/test/executeTests.pl
@@ -46,110 +46,152 @@ use Cwd;
 my $file = 'testapps.csv';
 my $xpiversion = `grep 'version>' ../install.rdf | sed -e 's/.*version>\\(.*\\)<\\/em.*/\\1/'`;
 chomp($xpiversion);
 my $xpi = "../../../AMO/CompactHeader-${xpiversion}.xpi";
 print "xpi: $xpi\n";
 
 my $ftpdir = "ftp";
 
-my ($ostype,$hosttype,$version,$ftppath,$app,$tests,$lightning);
+my ($ostype,$hosttype,$version,$ftppath,$app,$tests,$lightning,$checksums);
 my ($unpack, $unpackargs, $unpacktargetargs, $appbin, $virtualpython);
 my ($sysname, $nodename, $release, $osversion, $machine) = POSIX::uname();
 
 open (F, $file) || die ("Could not open $file!");
 
 mkdir "$ftpdir";
 
 if ($^O eq "msys") {
   $unpack = "unzip";
-  $unpackargs = "-o";
+  $unpackargs = "-qo";
   $unpacktargetargs = "-d";
   $appbin = "thunderbird.exe";
   $virtualpython = "../mozmill-virtualenv/Scripts/python";
 }
 elsif ($^O eq "linux") {
   $unpack = "tar";
-  $unpackargs = "xjvf";
+  $unpackargs = "xjf";
   $unpacktargetargs = "-C";
   $appbin = "thunderbird";
   $virtualpython = "../mozmill-virtualenv/bin/python";
 }
 
 while (my $line = <F>)
 {
-  ($ostype,$hosttype,$version,$ftppath,$app,$tests,$lightning) =
+  ($ostype,$hosttype,$ftppath,$app,$tests,$checksums, $lightning) =
     parse_csv($line);
+  next if (not defined($ostype));
 
-  $ftppath =~ s/_VER_/${version}/g;
-  $app =~ s/_VER_/${version}/g;
-  $tests =~ s/_VER_/${version}/g;
-
-  next if (not defined($ostype));
-  print "$ostype\t$hosttype\t$version\t$ftppath\t$app\t$tests\n";
+  my $dispMUA = "https://addons.mozilla.org/thunderbird/downloads/latest/562/addon-562-latest.xpi";
+#  print "$ostype\t$hosttype\t$ftppath\t$app\t$tests\n";
 
 #  next if ($version lt "9.0");
 
   if (($ostype eq $^O)
       && ($hosttype eq $machine)
       ) {
+
+    # Download checksums file to determine version of Thunderbird, because
+    # we use a link to latest release/beta/earlybird/trunk build and do not
+    # know the version!
+    #    wget -r -l1 --no-parent --follow-ftp -A .checksums  '' -nd
+    my @files = glob("$ftpdir/thunderbird*$checksums");
+    foreach my $file (@files) {
+      unlink($file);
+    }
+    `wget -r -l1 --no-parent --follow-ftp -A$checksums $ftppath -nd -P $ftpdir 2>&1`;
+    @files = glob("$ftpdir/thunderbird*$checksums");
+
+    my $file = $files[0];
+
+    $file =~ /thunderbird-(.*)$checksums/;
+    $version = $1;
+
+    # $ftppath =~ s/_VER_/${version}/g;
+    $app =~ s/_VER_/${version}/g;
+    $tests =~ s/_VER_/${version}/g;
+
     print "$ostype\t$hosttype\t$version\t$ftppath\t$app\t$tests\n";
 
     my $testdir = "test-$version";
 
     mkdir "$testdir";
-    system "wget", "-P", "$ftpdir/$ostype-$hosttype-$version", "-N", "$ftppath/$app";
-    system "wget", "-P", "$ftpdir/$ostype-$hosttype-$version", "-N", "$ftppath/$tests";
-    system "wget", "-P", "$ftpdir/$ostype-$hosttype-$version", "-N", "$lightning";
+    system "wget", "-q", "-P", "$ftpdir/$ostype-$hosttype-$version", "-N", "$ftppath/$app";
+    system "wget", "-q", "-P", "$ftpdir/$ostype-$hosttype-$version", "-N", "$ftppath/$tests";
+    system "wget", "-q", "-P", "$ftpdir/$ostype-$hosttype-$version", "-N", "$lightning";
+    system "wget", "-q", "-P", "$ftpdir/$ostype-$hosttype-$version", "-N", "$dispMUA";
+
+    my @dispMUAfiles = glob("$ftpdir/$ostype-$hosttype-$version/display_*");
+    my $dispMUAfile = $dispMUAfiles[-1];
 
     system $unpack, $unpackargs, "$ftpdir//$ostype-$hosttype-$version/$app", $unpacktargetargs, $testdir;
-    system "unzip", "-o", "$ftpdir//$ostype-$hosttype-$version/$tests", "-d", $testdir, "-x", "*mochitest*", "*xpcshell*";
+    system "unzip", "-q", "-o", "$ftpdir//$ostype-$hosttype-$version/$tests", "-d", $testdir, "-x", "*mochitest*", "*xpcshell*";
 
     my $currentdir = getcwd;
 
+    # "Link" the add-on tests into the mozmill directory
     if ($^O eq "msys") {
-      system "junction", "-d", "$testdir/mozmill/compactheader";
-      system "junction", "$testdir/mozmill/compactheader", "compactheader";
+      # Do not delete the test-xxx directory! Otherwise not only the link to
+      # the compactheader directory will be removed but also all files inside
+      # it (i.e. in the source directory).
+      `junction -d $testdir/mozmill/compactheader`;
+      `junction $testdir/mozmill/compactheader compactheader`;
     }
     else {
       system "ln", "-sfn", qq[$currentdir/compactheader], qq[$testdir/mozmill/compactheader];
     }
 
     # copy drag'n'drop helpers to shared-modules until they are added to thunderbird source
     my @shared_files = glob("shared-modules/*");
-    foreach (@shared_files) {
-      copy("$_","$testdir/mozmill/shared-modules");
+    foreach my $file (@shared_files) {
+      if (! -e "$testdir/mozmill/shared-modules/$file") {
+        copy("$file","$testdir/mozmill/shared-modules");
+      }
     }
 
     chdir "$testdir/mozmill";
-    system "pwd";
+    #system "pwd";
 
     my $log;
     my $python;
 
     if ($version ge "9.0") {
-      system "python resources/installmozmill.py ../mozmill-virtualenv";
+      `python resources/installmozmill.py ../mozmill-virtualenv`;
       $python = "$virtualpython";
     }
     else {
       $python = "python"
     }
 
-    print "$python runtest.py --binary=../thunderbird/$appbin -a $xpi -t compactheader 2>&1\n";
-   $log = $log . `$python runtest.py --binary=../thunderbird/$appbin -a $xpi -t compactheader 2>&1`;
-#    $log = $log . `python runtest.py --binary=../thunderbird/$appbin -a $xpi -t compactheader/test-compactheader-toolbar.js 2>&1`;
-    $log = $log . `$python runtest.py --binary=../thunderbird/$appbin -a $xpi,../../ftp//$ostype-$hosttype-$version/lightning.xpi -t compactheader/test-compactheader-preferences.js 2>&1`;
+    my @compatibility_apps = (
+      "../../ftp//$ostype-$hosttype-$version/lightning.xpi",
+      "../../$dispMUAfile"
+    );
+    my $comp_apps = join(",", @compatibility_apps);
+#    print "$python runtest.py --binary=../thunderbird/$appbin -a $xpi -t compactheader 2>&1\n";
+    $log = $log . `$python runtest.py --binary=../thunderbird/$appbin -a $xpi -t compactheader 2>&1`;
+    $log = $log . `$python runtest.py --binary=../thunderbird/$appbin -a $xpi,$comp_apps -t compactheader/test-compactheader-toolbar.js 2>&1`;
+    $log = $log . `$python runtest.py --binary=../thunderbird/$appbin -a $xpi,$comp_apps -t compactheader/test-compactheader-preferences.js 2>&1`;
 
     chdir "$currentdir";
     my @timeData = localtime(time);
     my $datestr = sprintf "%04d%02d%02d%02d%02d", 1900+$timeData[5],
       1+$timeData[4], $timeData[3], $timeData[2], $timeData[1];
     open (LOG, ">log-$version-$ostype-$hosttype-$datestr.txt");
     print LOG "$log";
     close(LOG);
+
+    print "Test failures:\n";
+    my @logs = split(/\n/, $log);
+    foreach my $line (@logs) {
+      if ($line =~ /(UNEXPECTED|^  )/) {
+        print "$line\n";
+      }
+    }
+    print "\n\n";
   }
 }
 
 close (F);
 
 sub parse_csv {
   my $text = shift;
   my @new = ();
--- a/test/testapps.csv
+++ b/test/testapps.csv
@@ -1,15 +1,23 @@
-"msys","i686","5.0","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/_VER_-candidates/build1/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/win32/lightning.xpi"
-"linux","i686","5.0","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/_VER_-candidates/build1/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
-"linux","x86_64","5.0","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/_VER_-candidates/build1/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
-"msys","i686","6.0.2","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/_VER_-candidates/build2/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/win32/lightning.xpi"
-"linux","i686","6.0.2","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/_VER_-candidates/build2/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
-"linux","x86_64","6.0.2","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/_VER_-candidates/build2/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
-"msys","i686","7.0b2","https://ftp.mozilla.org/pub/thunderbird/nightly/_VER_-candidates/build2/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/win32/lightning.xpi"
-"linux","i686","7.0b2","https://ftp.mozilla.org/pub/thunderbird/nightly/_VER_-candidates/build2/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
-"linux","x86_64","7.0b2","https://ftp.mozilla.org/pub/thunderbird/nightly/_VER_-candidates/build2/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
-"msys","i686","8.0a2","https://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-aurora/","thunderbird-_VER_.en-US.win32.zip","thunderbird-_VER_.en-US.win32.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-miramar/win32-xpi/lightning.xpi"
-"linux","i686","8.0a2","https://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-aurora/","thunderbird-_VER_.en-US.linux-i686.tar.bz2","thunderbird-_VER_.en-US.linux-i686.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-miramar/linux-xpi/lightning.xpi"
-"linux","x86_64","8.0a2","https://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-aurora/","thunderbird-_VER_.en-US.linux-x86_64.tar.bz2","thunderbird-_VER_.en-US.linux-x86_64.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-miramar/linux64-xpi/lightning.xpi"
-"msys","i686","9.0a1","https://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/","thunderbird-_VER_.en-US.win32.zip","thunderbird-_VER_.en-US.win32.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-central/win32-xpi/lightning.xpi"
-"linux","i686","9.0a1","https://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/","thunderbird-_VER_.en-US.linux-i686.tar.bz2","thunderbird-_VER_.en-US.linux-i686.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-central/linux-xpi/lightning.xpi"
-"linux","x86_64","9.0a1","https://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/","thunderbird-_VER_.en-US.linux-x86_64.tar.bz2","thunderbird-_VER_.en-US.linux-x86_64.tests.zip","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-central/linux64-xpi/lightning.xpi"
+"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/5.0-candidates/build1/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/win32/lightning.xpi"
+"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/5.0-candidates/build1/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
+"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/5.0-candidates/build1/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
+
+"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/6.0.2-candidates/build2/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/win32/lightning.xpi"
+"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/6.0.2-candidates/build2/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
+"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/6.0.2-candidates/build2/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
+
+"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/win32/lightning.xpi"
+"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
+"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-release/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
+
+"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/unsigned/win32/en-US/","thunderbird-_VER_.zip","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/win32/lightning.xpi"
+"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/linux-i686/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
+"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-candidate-comm-beta/linux-x86_64/en-US/","thunderbird-_VER_.tar.bz2","thunderbird-_VER_.tests.zip",".checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b5rc3/linux/lightning.xpi"
+
+"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-aurora/","thunderbird-_VER_.en-US.win32.zip","thunderbird-_VER_.en-US.win32.tests.zip",".en-US.win32.checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-miramar/win32-xpi/lightning.xpi"
+"linux","i686""https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-aurora/","thunderbird-_VER_.en-US.linux-i686.tar.bz2","thunderbird-_VER_.en-US.linux-i686.tests.zip",".en-US.linux-i686.checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-miramar/linux-xpi/lightning.xpi"
+"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-aurora/","thunderbird-_VER_.en-US.linux-x86_64.tar.bz2","thunderbird-_VER_.en-US.linux-x86_64.tests.zip",".en-US.linux-x86_64.checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-miramar/linux64-xpi/lightning.xpi"
+
+"msys","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-central/","thunderbird-_VER_.en-US.win32.zip","thunderbird-_VER_.en-US.win32.tests.zip",".en-US.win32.checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-central/win32-xpi/lightning.xpi"
+"linux","i686","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-central/","thunderbird-_VER_.en-US.linux-i686.tar.bz2","thunderbird-_VER_.en-US.linux-i686.tests.zip",".en-US.linux-i686.checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-central/linux-xpi/lightning.xpi"
+"linux","x86_64","https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-central/","thunderbird-_VER_.en-US.linux-x86_64.tar.bz2","thunderbird-_VER_.en-US.linux-x86_64.tests.zip",".en-US.linux-x86_64.checksums","https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/nightly/latest-comm-central/linux64-xpi/lightning.xpi"