Commits

camlspotter committed 1628d76

fix

  • Participants
  • Parent commits f90f6ea
  • Branches ocamlspot-312b

Comments (0)

Files changed (3)

0scripts/0MAKERELEASE

 #!/usr/bin/perl
 
-$VERSION="3.12.0.0";
-$PURE_OCAML="ocaml-svn-3.12-10585";
+$VERSION="3.12.0.0.0";
+$PURE_OCAML="ocaml-3.12.0+rc1-10630";
+$RELEASE_REV="f90f6ea169fc";
 
 # `/bin/cp ocamlspot/INSTALL-ocamlspot.txt ocamlspot/BRAIN_DEAD_INSTALL.sh .`;
 
 $dstdir = sprintf "ocamlspotter-%s", $VERSION;
 mkdir $dstdir;
 
-`hg diff -r $PURE_OCAML -r ocamlspot-312b -X "0*" -X ".hg[a-z]*" -X "ocamlspot" -X "boot" > $dstdir/compiler_patch.diff`;
+`hg diff -r $PURE_OCAML -r $RELEASE_REV -X "0*" -X ".hg[a-z]*" -X "ocamlspot" -X "boot" > $dstdir/compiler_patch.diff`;
 
 $com = sprintf "(cd ocamlspotter-%s; tar zxvf ../$tgz)", $VERSION;
 `$com`;

ocamlspot/BRAIN_DEAD_INSTALL.sh

 #!/bin/sh
 # No warranty, no question. Just for brain-dead people.
 set -e
-svn checkout http://caml.inria.fr/svn/ocaml/version/3.12 .
-svn update -r 10585 
+svn checkout http://caml.inria.fr/svn/ocaml/release/3.12.0+rc1 .
+svn update -r 10630 
 patch -p1 < compiler_patch.diff
 ./configure
 make core coreboot
 ./build/mixed-boot.sh
 cp boot/myocamlbuild boot/myocamlbuild.boot
 make world opt opt.opt
+echo ===================== testing =======================
+(cd ocamlspot/tests; make; ./auto-test.pl  *.ml *.mli) 
 echo ===================== congrats ======================
 echo Now you can type make intall
 echo Do not forget to install the elisp file, ocamlspot/ocamlspot.el

ocamlspot/tests/auto-test.pl

     }
 }
 
+my $all_tests = 0;
+my $all_succeeds = 0;
+
 sub test {
     my $file = $_[0];
     my $content = load_file($file);
 	    print "no ocamlspot binary around\n";
 	    exit 1;
 	}
+
+	$all_tests++;
+
 	while(<IN>){
             my $result;
             if( /^Spot: (.*):all/ ){ # whole file
                 if( $test_name eq $result ){
                     print STDERR "$file:$test_pos:$test_name:\tOK!\n";
                     $succeed = 1;
+		    $all_succeeds ++;
                 } else {
                     print STDERR "$file:$test_pos:$test_name:\tFAILED!\n$message\{ test_name=\"$test_name\"; result=\"$result\" \}\n";
                 }
 for $f (@ARGV) {
     test($f);
 }
+
+$ratio = $all_succeeds/$all_tests;
+printf "successes/tests = $all_succeeds/$all_tests = %.02f\n", $ratio;
+if( $ratio > 0.9 ){
+    print "Looks ok\n"; 
+    exit 0;
+} else {
+    print "Too many tests failed!\n"; 
+    exit 1;
+}
+
+