Annotation of gforth/testdist, revision 1.18
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`
6: GFORTH=`basename $1 .tar.gz`
1.17 anton 7: result=ok
1.18 ! anton 8: for CC in `(shopt -s nullglob; for i in /usr/sfw/bin /opt/csw/gcc4 \`echo $PATH|sed 's/:/ /g'\`; do for j in $i/gcc-*; do basename $j; done; done )|sort -u`; do
1.17 anton 9: 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
1.5 anton 21: chmod -R a-w $GFORTH
1.13 anton 22: rm -rf build
1.5 anton 23: mkdir build
24: cd build
1.17 anton 25: ../$GFORTH/configure --prefix=$DIR/install CC=$CC
26: else
27: echo building in $GFORTH with $CC
1.5 anton 28: cd $GFORTH
1.17 anton 29: ./configure --prefix=$DIR/install CC=$CC
30: fi &&
31: make &&
1.1 anton 32: #gforth locals-test.fs
33: #gforth test-counted-loops.fs
1.17 anton 34: make install &&
1.11 anton 35: #make all-bench &&
1.17 anton 36: 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 &&
1.18 ! anton 45: install/bin/gforth-fast --debug -e bye 2>&1 |grep 'Compiled with' ) &&
1.17 anton 46: last=ok
1.18 ! anton 47: echo $CC $last
1.17 anton 48: chmod -R +w $GFORTH
49: cd ..
50: test $result = ok -a $last = ok || result=broken
51: done
52: echo test $result
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>