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