Blame


1 35dc4510 2019-02-04 stsp #!/bin/sh
2 35dc4510 2019-02-04 stsp #
3 35dc4510 2019-02-04 stsp # Copyright (c) 2019 Stefan Sperling <stsp@openbsd.org>
4 35dc4510 2019-02-04 stsp #
5 35dc4510 2019-02-04 stsp # Permission to use, copy, modify, and distribute this software for any
6 35dc4510 2019-02-04 stsp # purpose with or without fee is hereby granted, provided that the above
7 35dc4510 2019-02-04 stsp # copyright notice and this permission notice appear in all copies.
8 35dc4510 2019-02-04 stsp #
9 35dc4510 2019-02-04 stsp # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 35dc4510 2019-02-04 stsp # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 35dc4510 2019-02-04 stsp # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 35dc4510 2019-02-04 stsp # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 35dc4510 2019-02-04 stsp # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 35dc4510 2019-02-04 stsp # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 35dc4510 2019-02-04 stsp # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 35dc4510 2019-02-04 stsp
17 35dc4510 2019-02-04 stsp . ./common.sh
18 35dc4510 2019-02-04 stsp
19 35dc4510 2019-02-04 stsp function test_status_basic {
20 35dc4510 2019-02-04 stsp local testroot=`test_init status_basic`
21 35dc4510 2019-02-04 stsp
22 35dc4510 2019-02-04 stsp got checkout $testroot/repo $testroot/wt > /dev/null
23 e60e7f5b 2019-02-10 stsp ret="$?"
24 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
25 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
26 35dc4510 2019-02-04 stsp return 1
27 35dc4510 2019-02-04 stsp fi
28 35dc4510 2019-02-04 stsp
29 35dc4510 2019-02-04 stsp echo "modified alpha" > $testroot/wt/alpha
30 35dc4510 2019-02-04 stsp echo "unversioned file" > $testroot/wt/foo
31 35dc4510 2019-02-04 stsp rm $testroot/wt/epsilon/zeta
32 14e5d4dc 2019-02-05 stsp touch $testroot/wt/beta
33 35dc4510 2019-02-04 stsp
34 35dc4510 2019-02-04 stsp echo 'M alpha' > $testroot/stdout.expected
35 35dc4510 2019-02-04 stsp echo '! epsilon/zeta' >> $testroot/stdout.expected
36 35dc4510 2019-02-04 stsp echo '? foo' >> $testroot/stdout.expected
37 35dc4510 2019-02-04 stsp
38 35dc4510 2019-02-04 stsp (cd $testroot/wt && got status > $testroot/stdout)
39 35dc4510 2019-02-04 stsp
40 35dc4510 2019-02-04 stsp cmp $testroot/stdout.expected $testroot/stdout
41 e60e7f5b 2019-02-10 stsp ret="$?"
42 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
43 35dc4510 2019-02-04 stsp diff -u $testroot/stdout.expected $testroot/stdout
44 35dc4510 2019-02-04 stsp fi
45 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
46 35dc4510 2019-02-04 stsp }
47 35dc4510 2019-02-04 stsp
48 f02ba292 2019-02-05 stsp function test_status_subdir_no_mods {
49 f02ba292 2019-02-05 stsp local testroot=`test_init status_subdir_no_mods 1`
50 f02ba292 2019-02-05 stsp
51 f02ba292 2019-02-05 stsp mkdir $testroot/repo/Basic/
52 f02ba292 2019-02-05 stsp mkdir $testroot/repo/Basic/Targets/
53 f02ba292 2019-02-05 stsp touch $testroot/repo/Basic/Targets/AArch64.cpp
54 f02ba292 2019-02-05 stsp touch $testroot/repo/Basic/Targets.cpp
55 f02ba292 2019-02-05 stsp touch $testroot/repo/Basic/Targets.h
56 f02ba292 2019-02-05 stsp (cd $testroot/repo && git add .)
57 f02ba292 2019-02-05 stsp git_commit $testroot/repo -m "add subdir with files"
58 f02ba292 2019-02-05 stsp
59 f02ba292 2019-02-05 stsp got checkout $testroot/repo $testroot/wt > /dev/null
60 e60e7f5b 2019-02-10 stsp ret="$?"
61 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
62 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
63 f02ba292 2019-02-05 stsp return 1
64 f02ba292 2019-02-05 stsp fi
65 f02ba292 2019-02-05 stsp
66 f02ba292 2019-02-05 stsp touch $testroot/stdout.expected
67 f02ba292 2019-02-05 stsp
68 f02ba292 2019-02-05 stsp # This used to erroneously print:
69 f02ba292 2019-02-05 stsp #
70 f02ba292 2019-02-05 stsp # ! Basic/Targets.cpp
71 f02ba292 2019-02-05 stsp # ? Basic/Targets.cpp
72 f02ba292 2019-02-05 stsp (cd $testroot/wt && got status > $testroot/stdout)
73 f02ba292 2019-02-05 stsp
74 f02ba292 2019-02-05 stsp cmp $testroot/stdout.expected $testroot/stdout
75 e60e7f5b 2019-02-10 stsp ret="$?"
76 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
77 f02ba292 2019-02-05 stsp diff -u $testroot/stdout.expected $testroot/stdout
78 f02ba292 2019-02-05 stsp fi
79 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
80 f02ba292 2019-02-05 stsp }
81 f02ba292 2019-02-05 stsp
82 f02ba292 2019-02-05 stsp function test_status_subdir_no_mods2 {
83 f02ba292 2019-02-05 stsp local testroot=`test_init status_subdir_no_mods2 1`
84 f02ba292 2019-02-05 stsp
85 f02ba292 2019-02-05 stsp mkdir $testroot/repo/AST
86 f02ba292 2019-02-05 stsp touch $testroot/repo/AST/APValue.cpp
87 f02ba292 2019-02-05 stsp mkdir $testroot/repo/ASTMatchers
88 f02ba292 2019-02-05 stsp touch $testroot/repo/ASTMatchers/ASTMatchFinder.cpp
89 f02ba292 2019-02-05 stsp mkdir $testroot/repo/Frontend
90 f02ba292 2019-02-05 stsp touch $testroot/repo/Frontend/ASTConsumers.cpp
91 f02ba292 2019-02-05 stsp mkdir $testroot/repo/Frontend/Rewrite
92 f02ba292 2019-02-05 stsp touch $testroot/repo/Frontend/Rewrite/CMakeLists.txt
93 f02ba292 2019-02-05 stsp mkdir $testroot/repo/FrontendTool
94 f02ba292 2019-02-05 stsp touch $testroot/repo/FrontendTool/CMakeLists.txt
95 f02ba292 2019-02-05 stsp touch $testroot/repo/FrontendTool/ExecuteCompilerInvocation.cpp
96 f02ba292 2019-02-05 stsp (cd $testroot/repo && git add .)
97 f02ba292 2019-02-05 stsp git_commit $testroot/repo -m "add subdir with files"
98 f02ba292 2019-02-05 stsp
99 f02ba292 2019-02-05 stsp got checkout $testroot/repo $testroot/wt > /dev/null
100 e60e7f5b 2019-02-10 stsp ret="$?"
101 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
102 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
103 f02ba292 2019-02-05 stsp return 1
104 f02ba292 2019-02-05 stsp fi
105 f02ba292 2019-02-05 stsp
106 f02ba292 2019-02-05 stsp touch $testroot/stdout.expected
107 f02ba292 2019-02-05 stsp
108 f02ba292 2019-02-05 stsp # This used to erroneously print:
109 f02ba292 2019-02-05 stsp #
110 f02ba292 2019-02-05 stsp # ! AST/APValue.cpp
111 f02ba292 2019-02-05 stsp # ? AST/APValue.cpp
112 f02ba292 2019-02-05 stsp # ! Frontend/ASTConsumers.cpp
113 f02ba292 2019-02-05 stsp # ! Frontend/Rewrite/CMakeLists.txt
114 f02ba292 2019-02-05 stsp # ? Frontend/ASTConsumers.cpp
115 f02ba292 2019-02-05 stsp # ? Frontend/Rewrite/CMakeLists.txt
116 f02ba292 2019-02-05 stsp (cd $testroot/wt && got status > $testroot/stdout)
117 f02ba292 2019-02-05 stsp
118 f02ba292 2019-02-05 stsp cmp $testroot/stdout.expected $testroot/stdout
119 e60e7f5b 2019-02-10 stsp ret="$?"
120 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
121 f02ba292 2019-02-05 stsp diff -u $testroot/stdout.expected $testroot/stdout
122 f02ba292 2019-02-05 stsp fi
123 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
124 f02ba292 2019-02-05 stsp }
125 f02ba292 2019-02-05 stsp
126 0dbc2271 2019-02-05 stsp function test_status_obstructed {
127 0dbc2271 2019-02-05 stsp local testroot=`test_init status_obstructed`
128 0dbc2271 2019-02-05 stsp
129 0dbc2271 2019-02-05 stsp got checkout $testroot/repo $testroot/wt > /dev/null
130 e60e7f5b 2019-02-10 stsp ret="$?"
131 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
132 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
133 0dbc2271 2019-02-05 stsp return 1
134 0dbc2271 2019-02-05 stsp fi
135 0dbc2271 2019-02-05 stsp
136 0dbc2271 2019-02-05 stsp rm $testroot/wt/epsilon/zeta
137 0dbc2271 2019-02-05 stsp mkdir $testroot/wt/epsilon/zeta
138 0dbc2271 2019-02-05 stsp
139 0dbc2271 2019-02-05 stsp echo '~ epsilon/zeta' > $testroot/stdout.expected
140 0dbc2271 2019-02-05 stsp
141 0dbc2271 2019-02-05 stsp (cd $testroot/wt && got status > $testroot/stdout)
142 0dbc2271 2019-02-05 stsp
143 0dbc2271 2019-02-05 stsp cmp $testroot/stdout.expected $testroot/stdout
144 e60e7f5b 2019-02-10 stsp ret="$?"
145 0dbc2271 2019-02-05 stsp if [ "$?" != "0" ]; then
146 0dbc2271 2019-02-05 stsp diff -u $testroot/stdout.expected $testroot/stdout
147 0dbc2271 2019-02-05 stsp fi
148 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
149 0dbc2271 2019-02-05 stsp }
150 0dbc2271 2019-02-05 stsp
151 02c07007 2019-02-10 stsp function test_status_shows_local_mods_after_update {
152 02c07007 2019-02-10 stsp local testroot=`test_init status_shows_local_mods_after_update 1`
153 02c07007 2019-02-10 stsp
154 02c07007 2019-02-10 stsp echo "1" > $testroot/repo/numbers
155 02c07007 2019-02-10 stsp echo "2" >> $testroot/repo/numbers
156 02c07007 2019-02-10 stsp echo "3" >> $testroot/repo/numbers
157 02c07007 2019-02-10 stsp echo "4" >> $testroot/repo/numbers
158 02c07007 2019-02-10 stsp echo "5" >> $testroot/repo/numbers
159 02c07007 2019-02-10 stsp echo "6" >> $testroot/repo/numbers
160 02c07007 2019-02-10 stsp echo "7" >> $testroot/repo/numbers
161 02c07007 2019-02-10 stsp echo "8" >> $testroot/repo/numbers
162 02c07007 2019-02-10 stsp (cd $testroot/repo && git add numbers)
163 02c07007 2019-02-10 stsp git_commit $testroot/repo -m "added numbers file"
164 02c07007 2019-02-10 stsp
165 02c07007 2019-02-10 stsp got checkout $testroot/repo $testroot/wt > /dev/null
166 02c07007 2019-02-10 stsp ret="$?"
167 02c07007 2019-02-10 stsp if [ "$ret" != "0" ]; then
168 02c07007 2019-02-10 stsp test_done "$testroot" "$ret"
169 02c07007 2019-02-10 stsp return 1
170 02c07007 2019-02-10 stsp fi
171 02c07007 2019-02-10 stsp
172 02c07007 2019-02-10 stsp sed -i 's/2/22/' $testroot/repo/numbers
173 02c07007 2019-02-10 stsp git_commit $testroot/repo -m "modified line 2"
174 02c07007 2019-02-10 stsp
175 02c07007 2019-02-10 stsp # modify line 7; both changes should merge cleanly
176 02c07007 2019-02-10 stsp sed -i 's/7/77/' $testroot/wt/numbers
177 02c07007 2019-02-10 stsp
178 02c07007 2019-02-10 stsp echo "G numbers" > $testroot/stdout.expected
179 02c07007 2019-02-10 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
180 02c07007 2019-02-10 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
181 02c07007 2019-02-10 stsp echo >> $testroot/stdout.expected
182 02c07007 2019-02-10 stsp
183 02c07007 2019-02-10 stsp (cd $testroot/wt && got update > $testroot/stdout)
184 02c07007 2019-02-10 stsp
185 02c07007 2019-02-10 stsp cmp $testroot/stdout.expected $testroot/stdout
186 02c07007 2019-02-10 stsp ret="$?"
187 02c07007 2019-02-10 stsp if [ "$ret" != "0" ]; then
188 02c07007 2019-02-10 stsp diff -u $testroot/stdout.expected $testroot/stdout
189 02c07007 2019-02-10 stsp test_done "$testroot" "$ret"
190 02c07007 2019-02-10 stsp return 1
191 02c07007 2019-02-10 stsp fi
192 02c07007 2019-02-10 stsp
193 02c07007 2019-02-10 stsp echo 'M numbers' > $testroot/stdout.expected
194 02c07007 2019-02-10 stsp
195 02c07007 2019-02-10 stsp (cd $testroot/wt && got status > $testroot/stdout)
196 02c07007 2019-02-10 stsp
197 02c07007 2019-02-10 stsp cmp $testroot/stdout.expected $testroot/stdout
198 02c07007 2019-02-10 stsp ret="$?"
199 02c07007 2019-02-10 stsp if [ "$ret" != "0" ]; then
200 02c07007 2019-02-10 stsp diff -u $testroot/stdout.expected $testroot/stdout
201 02c07007 2019-02-10 stsp fi
202 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
203 02c07007 2019-02-10 stsp }
204 02c07007 2019-02-10 stsp
205 18831e78 2019-02-10 stsp function test_status_unversioned_subdirs {
206 18831e78 2019-02-10 stsp local testroot=`test_init status_unversioned_subdirs 1`
207 18831e78 2019-02-10 stsp
208 18831e78 2019-02-10 stsp mkdir $testroot/repo/cdfs/
209 18831e78 2019-02-10 stsp touch $testroot/repo/cdfs/Makefile
210 18831e78 2019-02-10 stsp mkdir $testroot/repo/common/
211 18831e78 2019-02-10 stsp touch $testroot/repo/common/Makefile
212 18831e78 2019-02-10 stsp mkdir $testroot/repo/iso/
213 18831e78 2019-02-10 stsp touch $testroot/repo/iso/Makefile
214 18831e78 2019-02-10 stsp mkdir $testroot/repo/ramdisk/
215 18831e78 2019-02-10 stsp touch $testroot/repo/ramdisk/Makefile
216 18831e78 2019-02-10 stsp touch $testroot/repo/ramdisk/list.local
217 18831e78 2019-02-10 stsp mkdir $testroot/repo/ramdisk_cd/
218 18831e78 2019-02-10 stsp touch $testroot/repo/ramdisk_cd/Makefile
219 18831e78 2019-02-10 stsp touch $testroot/repo/ramdisk_cd/list.local
220 18831e78 2019-02-10 stsp (cd $testroot/repo && git add .)
221 18831e78 2019-02-10 stsp git_commit $testroot/repo -m "first commit"
222 18831e78 2019-02-10 stsp
223 18831e78 2019-02-10 stsp got checkout $testroot/repo $testroot/wt > /dev/null
224 18831e78 2019-02-10 stsp ret="$?"
225 18831e78 2019-02-10 stsp if [ "$ret" != "0" ]; then
226 18831e78 2019-02-10 stsp test_done "$testroot" "$ret"
227 18831e78 2019-02-10 stsp return 1
228 18831e78 2019-02-10 stsp fi
229 18831e78 2019-02-10 stsp
230 18831e78 2019-02-10 stsp mkdir $testroot/wt/cdfs/obj
231 18831e78 2019-02-10 stsp mkdir $testroot/wt/ramdisk/obj
232 18831e78 2019-02-10 stsp mkdir $testroot/wt/ramdisk_cd/obj
233 18831e78 2019-02-10 stsp mkdir $testroot/wt/iso/obj
234 18831e78 2019-02-10 stsp
235 18831e78 2019-02-10 stsp echo -n > $testroot/stdout.expected
236 18831e78 2019-02-10 stsp
237 18831e78 2019-02-10 stsp # This used to erroneously print:
238 18831e78 2019-02-10 stsp #
239 18831e78 2019-02-10 stsp # ! ramdisk_cd/Makefile
240 18831e78 2019-02-10 stsp # ! ramdisk_cd/list.local
241 18831e78 2019-02-10 stsp # ? ramdisk_cd/Makefile
242 18831e78 2019-02-10 stsp # ? ramdisk_cd/list.local
243 18831e78 2019-02-10 stsp (cd $testroot/wt && got status > $testroot/stdout)
244 18831e78 2019-02-10 stsp
245 18831e78 2019-02-10 stsp cmp $testroot/stdout.expected $testroot/stdout
246 18831e78 2019-02-10 stsp ret="$?"
247 18831e78 2019-02-10 stsp if [ "$ret" != "0" ]; then
248 18831e78 2019-02-10 stsp diff -u $testroot/stdout.expected $testroot/stdout
249 18831e78 2019-02-10 stsp fi
250 18831e78 2019-02-10 stsp test_done "$testroot" "$ret"
251 18831e78 2019-02-10 stsp }
252 18831e78 2019-02-10 stsp
253 2c201a36 2019-02-10 stsp # 'got status' ignores symlinks at present; this might change eventually
254 2c201a36 2019-02-10 stsp function test_status_ignores_symlink {
255 2c201a36 2019-02-10 stsp local testroot=`test_init status_ignores_symlink 1`
256 2c201a36 2019-02-10 stsp
257 2c201a36 2019-02-10 stsp mkdir $testroot/repo/ramdisk/
258 2c201a36 2019-02-10 stsp touch $testroot/repo/ramdisk/Makefile
259 2c201a36 2019-02-10 stsp (cd $testroot/repo && git add .)
260 2c201a36 2019-02-10 stsp git_commit $testroot/repo -m "first commit"
261 2c201a36 2019-02-10 stsp
262 2c201a36 2019-02-10 stsp got checkout $testroot/repo $testroot/wt > /dev/null
263 2c201a36 2019-02-10 stsp ret="$?"
264 2c201a36 2019-02-10 stsp if [ "$ret" != "0" ]; then
265 2c201a36 2019-02-10 stsp test_done "$testroot" "$ret"
266 2c201a36 2019-02-10 stsp return 1
267 2c201a36 2019-02-10 stsp fi
268 2c201a36 2019-02-10 stsp
269 2c201a36 2019-02-10 stsp ln -s /usr/obj/distrib/i386/ramdisk $testroot/wt/ramdisk/obj
270 3cbbd752 2019-02-19 stsp
271 3cbbd752 2019-02-19 stsp echo -n > $testroot/stdout.expected
272 3cbbd752 2019-02-19 stsp
273 3cbbd752 2019-02-19 stsp (cd $testroot/wt && got status > $testroot/stdout)
274 3cbbd752 2019-02-19 stsp
275 3cbbd752 2019-02-19 stsp cmp $testroot/stdout.expected $testroot/stdout
276 3cbbd752 2019-02-19 stsp ret="$?"
277 3cbbd752 2019-02-19 stsp if [ "$ret" != "0" ]; then
278 3cbbd752 2019-02-19 stsp diff -u $testroot/stdout.expected $testroot/stdout
279 3cbbd752 2019-02-19 stsp fi
280 3cbbd752 2019-02-19 stsp test_done "$testroot" "$ret"
281 3cbbd752 2019-02-19 stsp }
282 3cbbd752 2019-02-19 stsp
283 3cbbd752 2019-02-19 stsp function test_status_shows_no_mods_after_complete_merge {
284 3cbbd752 2019-02-19 stsp local testroot=`test_init status_shows_no_mods_after_complete_merge 1`
285 3cbbd752 2019-02-19 stsp
286 3cbbd752 2019-02-19 stsp # make this file larger than the usual blob buffer size of 8192
287 3cbbd752 2019-02-19 stsp echo -n > $testroot/repo/numbers
288 3cbbd752 2019-02-19 stsp for i in `jot 16384`; do
289 3cbbd752 2019-02-19 stsp echo "$i" >> $testroot/repo/numbers
290 3cbbd752 2019-02-19 stsp done
291 3cbbd752 2019-02-19 stsp
292 3cbbd752 2019-02-19 stsp (cd $testroot/repo && git add numbers)
293 3cbbd752 2019-02-19 stsp git_commit $testroot/repo -m "added numbers file"
294 3cbbd752 2019-02-19 stsp
295 3cbbd752 2019-02-19 stsp got checkout $testroot/repo $testroot/wt > /dev/null
296 3cbbd752 2019-02-19 stsp ret="$?"
297 3cbbd752 2019-02-19 stsp if [ "$ret" != "0" ]; then
298 3cbbd752 2019-02-19 stsp test_done "$testroot" "$ret"
299 3cbbd752 2019-02-19 stsp return 1
300 3cbbd752 2019-02-19 stsp fi
301 2c201a36 2019-02-10 stsp
302 3cbbd752 2019-02-19 stsp sed -i 's/2/22/' $testroot/repo/numbers
303 3cbbd752 2019-02-19 stsp git_commit $testroot/repo -m "modified line 2"
304 3cbbd752 2019-02-19 stsp
305 3cbbd752 2019-02-19 stsp sleep 1
306 3cbbd752 2019-02-19 stsp # modify line 2 again; no local changes are left after merge
307 3cbbd752 2019-02-19 stsp sed -i 's/2/22/' $testroot/wt/numbers
308 3cbbd752 2019-02-19 stsp
309 3cbbd752 2019-02-19 stsp echo "G numbers" > $testroot/stdout.expected
310 3cbbd752 2019-02-19 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
311 3cbbd752 2019-02-19 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
312 3cbbd752 2019-02-19 stsp echo >> $testroot/stdout.expected
313 3cbbd752 2019-02-19 stsp
314 3cbbd752 2019-02-19 stsp (cd $testroot/wt && got update > $testroot/stdout)
315 3cbbd752 2019-02-19 stsp
316 3cbbd752 2019-02-19 stsp cmp $testroot/stdout.expected $testroot/stdout
317 3cbbd752 2019-02-19 stsp ret="$?"
318 3cbbd752 2019-02-19 stsp if [ "$ret" != "0" ]; then
319 3cbbd752 2019-02-19 stsp diff -u $testroot/stdout.expected $testroot/stdout
320 3cbbd752 2019-02-19 stsp test_done "$testroot" "$ret"
321 3cbbd752 2019-02-19 stsp return 1
322 3cbbd752 2019-02-19 stsp fi
323 3cbbd752 2019-02-19 stsp
324 2c201a36 2019-02-10 stsp echo -n > $testroot/stdout.expected
325 2c201a36 2019-02-10 stsp
326 2c201a36 2019-02-10 stsp (cd $testroot/wt && got status > $testroot/stdout)
327 2c201a36 2019-02-10 stsp
328 2c201a36 2019-02-10 stsp cmp $testroot/stdout.expected $testroot/stdout
329 2c201a36 2019-02-10 stsp ret="$?"
330 2c201a36 2019-02-10 stsp if [ "$ret" != "0" ]; then
331 2c201a36 2019-02-10 stsp diff -u $testroot/stdout.expected $testroot/stdout
332 2c201a36 2019-02-10 stsp fi
333 2c201a36 2019-02-10 stsp test_done "$testroot" "$ret"
334 2c201a36 2019-02-10 stsp }
335 2c201a36 2019-02-10 stsp
336 35dc4510 2019-02-04 stsp run_test test_status_basic
337 f02ba292 2019-02-05 stsp run_test test_status_subdir_no_mods
338 f02ba292 2019-02-05 stsp run_test test_status_subdir_no_mods2
339 0dbc2271 2019-02-05 stsp run_test test_status_obstructed
340 02c07007 2019-02-10 stsp run_test test_status_shows_local_mods_after_update
341 18831e78 2019-02-10 stsp run_test test_status_unversioned_subdirs
342 2c201a36 2019-02-10 stsp run_test test_status_ignores_symlink
343 3cbbd752 2019-02-19 stsp run_test test_status_shows_no_mods_after_complete_merge