#!/bin/sh - # DBSQL - A SQL database engine. # # Copyright (C) 2007 The DBSQL Group, Inc. - All rights reserved. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # There are special exceptions to the terms and conditions of the GPL as it # is applied to this software. View the full text of the exception in file # LICENSE_EXCEPTIONS in the directory of this software distribution. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # $Id: s_test 7 2007-02-03 13:34:17Z gburd $ # # Build the Tcl test files. msg1="# Automatically built by dist/s_test; may require local editing." msg2="# Automatically built by dist/s_test; may require local editing." t=/tmp/__t trap 'rm -f $t; exit 0' 0 1 2 3 13 15 . RELEASE (echo "$msg1" && \ echo "" && \ echo "set tclsh_path @TCL_TCLSH@" && \ echo "set tcllib .libs/libdbsql_tcl-@DBSQL_VERSION_MAJOR@.@DBSQL_VERSION_MINOR@@LIBTSO_MODSUFFIX@" && \ echo "" && \ echo "set src_root @srcdir@/.." && \ echo "set test_path @srcdir@/../test" && \ echo "" && \ echo "global testdir" && \ echo "set testdir ./TESTDIR" && \ echo "" && \ echo "global dict" && \ echo "global util_path" && \ echo "" && \ echo "global is_hp_test" && \ echo "global is_qnx_test" && \ echo "global is_windows_test" && \ echo "" && \ echo "set KILL \"@db_cv_path_kill@\"") > $t f=../test/include.tcl cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) (echo "$msg1" && \ echo "" && \ echo "set tclsh_path SET_YOUR_TCLSH_PATH" && \ echo "set tcllib ./Debug/libdbsql_tcl${DBSQL_VERSION_MAJOR}${DBSQL_VERSION_MINOR}d.dll" && \ echo "" && \ echo "set src_root .." && \ echo "set test_path ../test" && \ echo "" && \ echo "global testdir" && \ echo "set testdir ./TESTDIR" && \ echo "" && \ echo "global dict" && \ echo "global util_path" && \ echo "" && \ echo "global is_hp_test" && \ echo "global is_qnx_test" && \ echo "global is_windows_test" && \ echo "" && \ echo "set KILL ./dbkill.exe") > $t f=../build_win32/include.tcl cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) # Build the test directory TESTS file. (echo $msg2; cat `egrep -l '^#[ ][ ]*TEST' ../test/*.tcl` | sed -e '/^#[ ][ ]*TEST/!{' \ -e 's/.*//' \ -e '}' | cat -s | sed -e '/TEST/{' \ -e 's/^#[ ][ ]*TEST[ ]*//' \ -e 's/^ //' \ -e 'H' \ -e 'd' \ -e '}' \ -e 's/.*//' \ -e x \ -e 's/\n/__LINEBREAK__/g' | sort | sed -e 's/__LINEBREAK__/\ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\ /' \ -e 's/__LINEBREAK__/\ /g' | sed -e 's/^[ ][ ]*$//') > $t f=../test/TESTS cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)