undo previous change, build now fixed in sge.spec
[boost.git] / boost-run-tests.patch
1 *** tools/regression/src/run_tests.sh.orig      2007-07-31 19:44:25.000000000 -0500
2 --- tools/regression/src/run_tests.sh   2007-08-01 12:17:25.000000000 -0500
3 ***************
4 *** 15,21 ****
5   # This can be either a non-exitent directory or an already complete Boost
6   # source tree.
7   #
8 ! boost_root="$HOME/CVSROOTs/Boost/boost_regression"
9   
10   #
11   # Wether to fetch the most current Boost code from CVS (yes/no):
12 --- 15,21 ----
13   # This can be either a non-exitent directory or an already complete Boost
14   # source tree.
15   #
16 ! boost_root="/usr/src/redhat/BUILD/boost_1_34_1"
17   
18   #
19   # Wether to fetch the most current Boost code from CVS (yes/no):
20 *************** test_tools=gcc
21 *** 42,58 ****
22   toolset=gcc
23   
24   #
25 - # "comment_path" is the path to an html-file describing the test environment.
26 - # The content of this file will be embedded in the status pages being produced.
27 - #
28 - comment_path="$boost_root/../regression_comment.html"
29 - #
30   # "test_dir" is the relative path to the directory to run the tests in,
31   # defaults to "status" and runs all the tests, but could be a sub-directory
32   # for example "libs/regex/test" to run the regex tests alone.
33   #
34   test_dir="status"
35   
36   
37   ### DEFAULTS ARE OK FOR THESE.
38   
39 --- 42,59 ----
40   toolset=gcc
41   
42   #
43   # "test_dir" is the relative path to the directory to run the tests in,
44   # defaults to "status" and runs all the tests, but could be a sub-directory
45   # for example "libs/regex/test" to run the regex tests alone.
46   #
47   test_dir="status"
48   
49 + #
50 + # "comment_path" is the path to an html-file describing the test environment.
51 + # The content of this file will be embedded in the status pages being produced.
52 + #
53 + comment_path="$boost_root/$test_dir/regression_comment.html"
54
55   
56   ### DEFAULTS ARE OK FOR THESE.
57   
58 *************** exe_suffix=
59 *** 71,76 ****
60 --- 72,80 ----
61   #
62   bjam="$boost_root/tools/jam/src/bin/bjam$exe_suffix"
63   
64 + # bjam options
65 + bjam_flags="--layout=system variant=release -sICU_PATH=/usr --user-config=$boost_root/user-config.jam"
66
67   #
68   # "process_jam_log", and "compiler_status" paths to built helper programs:
69   # The location of the executables of the regression help programs. These
70 *************** else
71 *** 98,103 ****
72 --- 102,115 ----
73   fi
74   export BOOST_BUILD_PATH
75   
76 + # For shared objects.
77 + old_ld_library_path=$LD_LIBRARY_PATH
78 + old_ld_run_path=$LD_RUN_PATH
79 + LD_LIBRARY_PATH="$boost_root/stage/lib:$old_ld_library_path"
80 + LD_RUN_PATH="$boost_root/stage/lib:$old_ld_run_path"
81 + export LD_LIBRARY_PATH
82 + export LD_RUN_PATH
83
84   #
85   # STEP 0:
86   #
87 *************** fi
88 *** 126,137 ****
89   # STEP 1:
90   # rebuild bjam if required:
91   #
92 ! echo building bjam:
93 ! cd "$boost_root/tools/jam/src" && \
94 ! LOCATE_TARGET=bin sh ./build.sh
95 ! if test $? != 0 ; then
96 !     echo "bjam build failed."
97 !     exit 256
98   fi
99   
100   #
101 --- 138,152 ----
102   # STEP 1:
103   # rebuild bjam if required:
104   #
105 ! echo "finding or building bjam":
106 ! if test ! -f "$bjam" ; then
107 !   echo "building bjam":
108 !     cd "$boost_root/tools/jam/src" && \
109 !     LOCATE_TARGET=bin sh ./build.sh
110 !     if test $? != 0 ; then
111 !       echo "bjam build failed."
112 !       exit 256
113 !     fi
114   fi
115   
116   #
117 *************** fi
118 *** 139,146 ****
119   # rebuild the regression test helper programs if required:
120   #
121   echo building regression test helper programs:
122 ! cd "$boost_root/tools/regression/build" && \
123 ! "$bjam" $toolset release
124   if test $? != 0 ; then
125       echo "helper program build failed."
126       exit 256
127 --- 154,160 ----
128   # rebuild the regression test helper programs if required:
129   #
130   echo building regression test helper programs:
131 ! cd "$boost_root/tools/regression/build" && "$bjam" $bjam_flags $toolset
132   if test $? != 0 ; then
133       echo "helper program build failed."
134       exit 256
135 *************** for tool in $test_tools ; do
136 *** 158,164 ****
137   #
138   echo running the $tool regression tests:
139   cd "$boost_root/$test_dir"
140 ! "$bjam" $tool --dump-tests 2>&1 | tee regress.log
141   
142   #
143   # STEP 4:
144 --- 172,180 ----
145   #
146   echo running the $tool regression tests:
147   cd "$boost_root/$test_dir"
148 ! echo "<p> begin time: " `date` "</p>" >> "$comment_path"
149 ! "$bjam" $bjam_flags $tool --dump-tests 2>&1 | tee regress.log
150 ! echo "<p> end time: " `date` "</p>" >> "$comment_path"
151   
152   #
153   # STEP 4:
154 *************** if test $? != 0 ; then
155 *** 185,190 ****
156 --- 201,212 ----
157       exit 256
158   fi
159   
160 + # cleanup
161 + LD_LIBRARY_PATH="$old_ld_library_path"
162 + LD_RUN_PATH="$old_ld_run_path"
163 + export LD_LIBRARY_PATH
164 + export LD_RUN_PATH
165
166   echo "done!"
167   
168