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