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