# HG changeset patch # User Rob Landley # Date 1199401859 21600 # Node ID e0e9974a231b0d3806c294cf8943b6be59da70b4 # Parent 9778e985b450310c78569c8843363487fb96b828 Upgrade test.sh to test tinycc as a shared library. diff -r 9778e985b450 -r e0e9974a231b make/test.sh --- a/make/test.sh Thu Jan 03 15:04:21 2008 -0600 +++ b/make/test.sh Thu Jan 03 17:10:59 2008 -0600 @@ -2,9 +2,18 @@ source ./configure -$CC $CFLAGS -I. -Iinclude -o test1 tests/tcctest.c && -./test1 > test1.out && -./tinycc -I. -Iinclude -o test2 tests/tcctest.c && -./test2 > test2.out && -diff -u test1.out test2.out -[ $? -eq 0 ] && echo Test passed. +$DEBUG $CC $CFLAGS -I. -Iinclude -o test1 tests/tcctest.c && +$DEBUG ./test1 > test1.out && +$DEBUG ./tinycc -I. -L. -Iinclude -o test2 tests/tcctest.c && +$DEBUG ./test2 > test2.out && +$DEBUG diff -u test1.out test2.out +if [ $? -eq 0 ] +then + echo Tinycc test passed. +else + exit 1 +fi + +$DEBUG $CC $CFLAGS -Iinclude -L . -ltinycc-i386 tests/libtcc_test.c -o libtcc_test && +LD_LIBRARY_PATH=. $DEBUG ./libtcc_test +[ $? -eq 0 ] && echo libtinycc test passed.