changeset 548:e0e9974a231b

Upgrade test.sh to test tinycc as a shared library.
author Rob Landley <rob@landley.net>
date Thu, 03 Jan 2008 17:10:59 -0600
parents 9778e985b450
children 26c8edc8b79f
files make/test.sh
diffstat 1 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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.