File:  [gforth] / gforth / testdist
Revision 1.19: download - view: text, annotated - select for diffs
Sat Oct 25 22:48:20 2008 UTC (15 years, 5 months ago) by anton
Branches: MAIN
CVS tags: HEAD
more t1000 workarounds

    1: #! /bin/bash
    2: #tests that dist works
    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`
    7: result=ok
    8: 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:     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: 	chmod -R a-w $GFORTH
   22: 	rm -rf build
   23: 	mkdir build
   24: 	cd build
   25: 	../$GFORTH/configure --prefix=$DIR/install CC=$CC
   26:      else
   27: 	echo building in $GFORTH with $CC
   28: 	cd $GFORTH
   29: 	./configure --prefix=$DIR/install CC=$CC
   30:      fi &&
   31:      make &&
   32: #gforth locals-test.fs
   33: #gforth test-counted-loops.fs
   34:      make install &&
   35: #make all-bench &&
   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 &&
   45:      install/bin/gforth-fast --debug -e bye 2>&1 |grep 'Compiled with' ) &&
   46:     last=ok
   47:     echo $CC $last
   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>