From 399da01ae4eb5c5e3e9349bacc2063c946c3d4a1 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Tue, 11 Aug 2009 11:17:23 +0000 Subject: Merge the branches/struggleyb/libdom-remain back to trunk. svn path=/trunk/dom/; revision=9191 --- test/build-test.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 test/build-test.sh (limited to 'test/build-test.sh') diff --git a/test/build-test.sh b/test/build-test.sh new file mode 100755 index 0000000..a353298 --- /dev/null +++ b/test/build-test.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# This is a simple script to recompile a C test file. +# Usage: +# This script is designed to run under test output directory. +# +# You should firstly run "run-test.sh", which will genrate a test output directory. In that +# directory, there are C source files and corresponding executables. +# +# ../../../build-test.sh some-test-converted-c-file.c +# +# This file is part of libdom test suite. +# Licensed under the MIT License, +# http://www.opensource.org/licenses/mit-license.php +# Copyright 2009 Bo Yang + +src="testutils/comparators.c testutils/domtsasserts.c testutils/foreach.c testutils/list.c testutils/load.c testutils/utils.c testutils/domtscondition.c" +domdir="../build-Linux-Linux-debug-lib-static" +ldflags="-L$domdir -ldom -L/usr/local/lib -lwapcaplet -L/usr/lib -lxml2 -lhubbub -lparserutils" +#ldflags="-L/usr/lib -lm -lz -L$domdir -ldom -L/usr/local/lib -lwapcaplet -lxml2 -lhubbub -lparserutils" +cflags="-Itestutils/ -I../bindings/xml -I../include -I../bindings/hubbub -I/usr/local/include" + +sf="$1"; +echo $sf; +cwd=$(pwd); +cd ../../../ +exe=${sf%%.c}; +cfile="$cwd"/"$sf"; +gcc -g $cflags $src $cfile $ldflags -o $exe; +mv $exe $cwd; +cd $cwd; -- cgit v1.2.3