Annotation of gforth/testdist, revision 1.17

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>