[gforth] / gforth / testdist  

gforth: gforth/testdist


1 : anton 1.17 #! /bin/bash
2 : anton 1.1 #tests that dist works
3 : anton 1.5 #usage: testdist gforth-version.tar.gz
4 :     #gforth-version.tar.gz must be in the working directory
5 :     MACHINE=`hostname`
6 :     GFORTH=`basename $1 .tar.gz`
7 : anton 1.17 result=ok
8 : anton 1.19 for CC in `(shopt -s nullglob; for i in /usr/sfw/bin /opt/csw/gcc4/bin \`echo $PATH|sed 's/:/ /g'\`; do for j in $i/gcc-*; do basename $j; done; done )|sort -u`; do
9 : anton 1.17 last=broken
10 :     rm -rf $CC
11 :     mkdir $CC
12 :     cd $CC
13 :     PATHDIR=`pwd`
14 :     DIR=`cygpath -m \`pwd\` 2>/dev/null` || DIR=`pwd`
15 :     chmod -R +w $GFORTH
16 :     rm -rf $GFORTH
17 :     gunzip -cd ../$1 | tar xf -
18 :     (if make --version|grep -q GNU
19 :     then
20 :     echo building in build with $CC
21 : anton 1.5 chmod -R a-w $GFORTH
22 : anton 1.13 rm -rf build
23 : anton 1.5 mkdir build
24 :     cd build
25 : anton 1.17 ../$GFORTH/configure --prefix=$DIR/install CC=$CC
26 :     else
27 :     echo building in $GFORTH with $CC
28 : anton 1.5 cd $GFORTH
29 : anton 1.17 ./configure --prefix=$DIR/install CC=$CC
30 :     fi &&
31 :     make &&
32 : anton 1.1 #gforth locals-test.fs
33 :     #gforth test-counted-loops.fs
34 : anton 1.17 make install &&
35 : anton 1.11 #make all-bench &&
36 : anton 1.17 chmod -R +w ../$GFORTH/vmgen-ex ../$GFORTH/vmgen-ex2 &&
37 :     cd ../$GFORTH/vmgen-ex &&
38 :     PATH=$PATHDIR/install/bin:$PATH make check GCC="$CC -O" YACC=yacc LEX=lex &&
39 :     cd ../vmgen-ex2 &&
40 :     PATH=$DIR/install/bin:$PATH make check GCC="$CC -O" YACC=yacc LEX=lex &&
41 :     cd .. &&
42 :     cd .. &&
43 :     install/bin/gforth test/tester.fs test/coretest.fs test/postpone.fs test/dbltest.fs -e bye >&/dev/null &&
44 :     make -f build/Makefile onebench ENGINE_FAST=install/bin/gforth-fast &&
45 : anton 1.18 install/bin/gforth-fast --debug -e bye 2>&1 |grep 'Compiled with' ) &&
46 : anton 1.17 last=ok
47 : anton 1.18 echo $CC $last
48 : anton 1.17 chmod -R +w $GFORTH
49 :     cd ..
50 :     test $result = ok -a $last = ok || result=broken
51 :     done
52 :     echo test $result

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help