1 | #!/bin/sh - |
---|
2 | # Id: s_test,v 1.24 2002/08/09 02:24:58 bostic Exp |
---|
3 | # |
---|
4 | # Build the Tcl test files. |
---|
5 | |
---|
6 | msg1="# Automatically built by dist/s_test; may require local editing." |
---|
7 | msg2="# Automatically built by dist/s_test; may require local editing." |
---|
8 | |
---|
9 | t=/tmp/__t |
---|
10 | trap '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@.@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 "" && \ |
---|
26 | echo "global testdir" && \ |
---|
27 | echo "set testdir ./TESTDIR" && \ |
---|
28 | echo "" && \ |
---|
29 | echo "global dict" && \ |
---|
30 | echo "global util_path" && \ |
---|
31 | echo "" && \ |
---|
32 | echo "global is_hp_test" && \ |
---|
33 | echo "global is_qnx_test" && \ |
---|
34 | echo "global is_windows_test" && \ |
---|
35 | echo "" && \ |
---|
36 | echo "set KILL \"@db_cv_path_kill@\"") > $t |
---|
37 | |
---|
38 | f=../test/include.tcl |
---|
39 | cmp $t $f > /dev/null 2>&1 || |
---|
40 | (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) |
---|
41 | |
---|
42 | (echo "$msg1" && \ |
---|
43 | echo "" && \ |
---|
44 | echo "set tclsh_path SET_YOUR_TCLSH_PATH" && \ |
---|
45 | echo "set tcllib ./Debug/libdb_tcl${DB_VERSION_MAJOR}${DB_VERSION_MINOR}d.dll" && \ |
---|
46 | echo "" && \ |
---|
47 | echo "set src_root .." && \ |
---|
48 | echo "set test_path ../test" && \ |
---|
49 | echo "" && \ |
---|
50 | echo "global testdir" && \ |
---|
51 | echo "set testdir ./TESTDIR" && \ |
---|
52 | echo "" && \ |
---|
53 | echo "global dict" && \ |
---|
54 | echo "global util_path" && \ |
---|
55 | echo "" && \ |
---|
56 | echo "global is_hp_test" && \ |
---|
57 | echo "global is_qnx_test" && \ |
---|
58 | echo "global is_windows_test" && \ |
---|
59 | echo "" && \ |
---|
60 | echo "set KILL ./dbkill.exe") > $t |
---|
61 | |
---|
62 | f=../build_win32/include.tcl |
---|
63 | cmp $t $f > /dev/null 2>&1 || |
---|
64 | (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) |
---|
65 | |
---|
66 | # Build the test directory TESTS file. |
---|
67 | (echo $msg2; |
---|
68 | cat `egrep -l '^#[ ][ ]*TEST' ../test/*.tcl` | |
---|
69 | sed -e '/^#[ ][ ]*TEST/!{' \ |
---|
70 | -e 's/.*//' \ |
---|
71 | -e '}' | |
---|
72 | cat -s | |
---|
73 | sed -e '/TEST/{' \ |
---|
74 | -e 's/^#[ ][ ]*TEST[ ]*//' \ |
---|
75 | -e 's/^ //' \ |
---|
76 | -e 'H' \ |
---|
77 | -e 'd' \ |
---|
78 | -e '}' \ |
---|
79 | -e 's/.*//' \ |
---|
80 | -e x \ |
---|
81 | -e 's/\n/__LINEBREAK__/g' | |
---|
82 | sort | |
---|
83 | sed -e 's/__LINEBREAK__/\ |
---|
84 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\ |
---|
85 | /' \ |
---|
86 | -e 's/__LINEBREAK__/\ |
---|
87 | /g' | |
---|
88 | sed -e 's/^[ ][ ]*$//') > $t |
---|
89 | |
---|
90 | f=../test/TESTS |
---|
91 | cmp $t $f > /dev/null 2>&1 || |
---|
92 | (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) |
---|