1#!/bin/sh - 2# $Id: s_test,v 12.5 2006/07/07 19:05:59 bostic Exp $ 3# 4# Build the Tcl test files. 5 6msg1="# Automatically built by dist/s_test; may require local editing." 7msg2="# Automatically built by dist/s_test; may require local editing." 8 9t=/tmp/__t 10trap 'rm -f $t; exit 0' 0 1 2 3 13 15 11 12. RELEASE 13 14(echo "$msg1" && \ 15 echo "" && \ 16 echo "set tclsh_path @TCL_TCLSH@" && \ 17 echo "set tcllib .libs/libdb_tcl-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@@LIBTSO_MODSUFFIX@" && \ 18 echo "" && \ 19 echo "set rpc_server localhost" && \ 20 echo "set rpc_path ." && \ 21 echo "set rpc_testdir \$rpc_path/TESTDIR" && \ 22 echo "" && \ 23 echo "set src_root @srcdir@/.." && \ 24 echo "set test_path @srcdir@/../test" && \ 25 echo "set je_root @srcdir@/../../je" && \ 26 echo "" && \ 27 echo "global testdir" && \ 28 echo "set testdir ./TESTDIR" && \ 29 echo "" && \ 30 echo "global dict" && \ 31 echo "global util_path" && \ 32 echo "" && \ 33 echo "global is_freebsd_test" && \ 34 echo "global is_hp_test" && \ 35 echo "global is_linux_test" && \ 36 echo "global is_qnx_test" && \ 37 echo "global is_sunos_test" && \ 38 echo "global is_windows_test" && \ 39 echo "global is_windows9x_test" && \ 40 echo "" && \ 41 echo "global valid_methods" && \ 42 echo "global checking_valid_methods" && \ 43 echo "global test_recopts" && \ 44 echo "" && \ 45 echo "set KILL \"@KILL@\"") > $t 46 47f=../test/include.tcl 48cmp $t $f > /dev/null 2>&1 || 49 (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) 50 51(echo "$msg1" && \ 52 echo "" && \ 53 echo "set tclsh_path SET_YOUR_TCLSH_PATH" && \ 54 echo "set tcllib ./Debug/libdb_tcl${DB_VERSION_MAJOR}${DB_VERSION_MINOR}d.dll" && \ 55 echo "" && \ 56 echo "set src_root .." && \ 57 echo "set test_path ../test" && \ 58 echo "set je_root ../../je" && \ 59 echo "" && \ 60 echo "global testdir" && \ 61 echo "set testdir ./TESTDIR" && \ 62 echo "" && \ 63 echo "global dict" && \ 64 echo "global util_path" && \ 65 echo "" && \ 66 echo "global is_freebsd_test" && \ 67 echo "global is_hp_test" && \ 68 echo "global is_linux_test" && \ 69 echo "global is_qnx_test" && \ 70 echo "global is_sunos_test" && \ 71 echo "global is_windows_test" && \ 72 echo "global is_windows9x_test" && \ 73 echo "" && \ 74 echo "global valid_methods" && \ 75 echo "global checking_valid_methods" && \ 76 echo "global test_recopts" && \ 77 echo "" && \ 78 echo "set KILL ./dbkill.exe") > $t 79 80f=../build_windows/include.tcl 81cmp $t $f > /dev/null 2>&1 || 82 (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) 83 84# Build the test directory TESTS file. 85(echo $msg2; 86cat `egrep -l '^#[ ][ ]*TEST' ../test/*.tcl` | 87sed -e '/^#[ ][ ]*TEST/!{' \ 88 -e 's/.*//' \ 89 -e '}' | 90cat -s | 91sed -e '/TEST/{' \ 92 -e 's/^#[ ][ ]*TEST[ ]*//' \ 93 -e 's/^ //' \ 94 -e 'H' \ 95 -e 'd' \ 96 -e '}' \ 97 -e 's/.*//' \ 98 -e x \ 99 -e 's/\n/__LINEBREAK__/g' | 100sort | 101sed -e 's/__LINEBREAK__/\ 102=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\ 103/' \ 104 -e 's/__LINEBREAK__/\ 105 /g' | 106sed -e 's/^[ ][ ]*$//') > $t 107 108f=../test/TESTS 109cmp $t $f > /dev/null 2>&1 || 110 (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) 111