##// END OF EJS Templates
tests: mock getpid to reduce glob usage...
timeless -
r28242:e8ad56d9 default
parent child Browse files
Show More
@@ -13,9 +13,9 b' command, exit codes, and duration'
13 $ echo a > a
13 $ echo a > a
14 $ hg add a
14 $ hg add a
15 $ hg blackbox
15 $ hg blackbox
16 1970/01/01 00:00:00 bob (*)> add a (glob)
16 1970/01/01 00:00:00 bob (5000)> add a
17 1970/01/01 00:00:00 bob (*)> add a exited 0 after * seconds (glob)
17 1970/01/01 00:00:00 bob (5000)> add a exited 0 after * seconds (glob)
18 1970/01/01 00:00:00 bob (*)> blackbox (glob)
18 1970/01/01 00:00:00 bob (5000)> blackbox
19
19
20 incoming change tracking
20 incoming change tracking
21
21
@@ -45,12 +45,12 b' clone, commit, pull'
45 added 1 changesets with 1 changes to 1 files
45 added 1 changesets with 1 changes to 1 files
46 (run 'hg update' to get a working copy)
46 (run 'hg update' to get a working copy)
47 $ hg blackbox -l 6
47 $ hg blackbox -l 6
48 1970/01/01 00:00:00 bob (*)> pull (glob)
48 1970/01/01 00:00:00 bob (5000)> pull
49 1970/01/01 00:00:00 bob (*)> updated served branch cache in * seconds (glob)
49 1970/01/01 00:00:00 bob (5000)> updated served branch cache in * seconds (glob)
50 1970/01/01 00:00:00 bob (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
50 1970/01/01 00:00:00 bob (5000)> wrote served branch cache with 1 labels and 2 nodes
51 1970/01/01 00:00:00 bob (*)> 1 incoming changes - new heads: d02f48003e62 (glob)
51 1970/01/01 00:00:00 bob (5000)> 1 incoming changes - new heads: d02f48003e62
52 1970/01/01 00:00:00 bob (*)> pull exited 0 after * seconds (glob)
52 1970/01/01 00:00:00 bob (5000)> pull exited 0 after * seconds (glob)
53 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
53 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
54
54
55 we must not cause a failure if we cannot write to the log
55 we must not cause a failure if we cannot write to the log
56
56
@@ -107,12 +107,12 b' backup bundles get logged'
107 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
107 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
108 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
108 saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
109 $ hg blackbox -l 6
109 $ hg blackbox -l 6
110 1970/01/01 00:00:00 bob (*)> strip tip (glob)
110 1970/01/01 00:00:00 bob (5000)> strip tip
111 1970/01/01 00:00:00 bob (*)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg (glob)
111 1970/01/01 00:00:00 bob (5000)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg (glob)
112 1970/01/01 00:00:00 bob (*)> updated base branch cache in * seconds (glob)
112 1970/01/01 00:00:00 bob (5000)> updated base branch cache in * seconds (glob)
113 1970/01/01 00:00:00 bob (*)> wrote base branch cache with 1 labels and 2 nodes (glob)
113 1970/01/01 00:00:00 bob (5000)> wrote base branch cache with 1 labels and 2 nodes
114 1970/01/01 00:00:00 bob (*)> strip tip exited 0 after * seconds (glob)
114 1970/01/01 00:00:00 bob (5000)> strip tip exited 0 after * seconds (glob)
115 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
115 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
116
116
117 extension and python hooks - use the eol extension for a pythonhook
117 extension and python hooks - use the eol extension for a pythonhook
118
118
@@ -125,12 +125,12 b' extension and python hooks - use the eol'
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 1 other heads for branch "default"
126 1 other heads for branch "default"
127 $ hg blackbox -l 6
127 $ hg blackbox -l 6
128 1970/01/01 00:00:00 bob (*)> update (glob)
128 1970/01/01 00:00:00 bob (5000)> update
129 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 0 tags (glob)
129 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 0 tags
130 1970/01/01 00:00:00 bob (*)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
130 1970/01/01 00:00:00 bob (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
131 1970/01/01 00:00:00 bob (*)> exthook-update: echo hooked finished in * seconds (glob)
131 1970/01/01 00:00:00 bob (5000)> exthook-update: echo hooked finished in * seconds (glob)
132 1970/01/01 00:00:00 bob (*)> update exited 0 after * seconds (glob)
132 1970/01/01 00:00:00 bob (5000)> update exited 0 after * seconds (glob)
133 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
133 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
134
134
135 log rotation
135 log rotation
136
136
@@ -151,7 +151,7 b' log rotation'
151 $ hg init blackboxtest3
151 $ hg init blackboxtest3
152 $ cd blackboxtest3
152 $ cd blackboxtest3
153 $ hg blackbox
153 $ hg blackbox
154 1970/01/01 00:00:00 bob (*)> blackbox (glob)
154 1970/01/01 00:00:00 bob (5000)> blackbox
155 $ mv .hg/blackbox.log .hg/blackbox.log-
155 $ mv .hg/blackbox.log .hg/blackbox.log-
156 $ mkdir .hg/blackbox.log
156 $ mkdir .hg/blackbox.log
157 $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\nos.rename(".hg/blackbox.log-", ".hg/blackbox.log")\n\1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py
157 $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\nos.rename(".hg/blackbox.log-", ".hg/blackbox.log")\n\1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py
@@ -178,9 +178,9 b' log rotation'
178
178
179 result: None
179 result: None
180 $ hg blackbox
180 $ hg blackbox
181 1970/01/01 00:00:00 bob (*)> blackbox (glob)
181 1970/01/01 00:00:00 bob (5000)> blackbox
182 1970/01/01 00:00:00 bob (*)> blackbox exited 0 after * seconds (glob)
182 1970/01/01 00:00:00 bob (5000)> blackbox exited 0 after * seconds (glob)
183 1970/01/01 00:00:00 bob (*)> blackbox (glob)
183 1970/01/01 00:00:00 bob (5000)> blackbox
184
184
185 cleanup
185 cleanup
186 $ cd ..
186 $ cd ..
@@ -68,11 +68,11 b' Hiding a non-tip changeset should change'
68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
68 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
69
69
70 $ hg blackbox -l 5
70 $ hg blackbox -l 5
71 1970/01/01 00:00:00 bob (*)> tags (glob)
71 1970/01/01 00:00:00 bob (5000)> tags
72 1970/01/01 00:00:00 bob (*)> 2/2 cache hits/lookups in * seconds (glob)
72 1970/01/01 00:00:00 bob (5000)> 2/2 cache hits/lookups in * seconds (glob)
73 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 2 tags (glob)
73 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 2 tags
74 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
74 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
75 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob)
75 1970/01/01 00:00:00 bob (5000)> blackbox -l 5
76
76
77 Hiding another changeset should cause the filtered hash to change
77 Hiding another changeset should cause the filtered hash to change
78
78
@@ -88,11 +88,11 b' Hiding another changeset should cause th'
88 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
88 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41 head2
89
89
90 $ hg blackbox -l 5
90 $ hg blackbox -l 5
91 1970/01/01 00:00:00 bob (*)> tags (glob)
91 1970/01/01 00:00:00 bob (5000)> tags
92 1970/01/01 00:00:00 bob (*)> 1/1 cache hits/lookups in * seconds (glob)
92 1970/01/01 00:00:00 bob (5000)> 1/1 cache hits/lookups in * seconds (glob)
93 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
93 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
94 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
94 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
95 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob)
95 1970/01/01 00:00:00 bob (5000)> blackbox -l 5
96
96
97 Resolving tags on an unfiltered repo writes a separate tags cache
97 Resolving tags on an unfiltered repo writes a separate tags cache
98
98
@@ -109,8 +109,8 b' Resolving tags on an unfiltered repo wri'
109 d75775ffbc6bca1794d300f5571272879bd280da test2
109 d75775ffbc6bca1794d300f5571272879bd280da test2
110
110
111 $ hg blackbox -l 5
111 $ hg blackbox -l 5
112 1970/01/01 00:00:00 bob (*)> --hidden tags (glob)
112 1970/01/01 00:00:00 bob (5000)> --hidden tags
113 1970/01/01 00:00:00 bob (*)> 2/2 cache hits/lookups in * seconds (glob)
113 1970/01/01 00:00:00 bob (5000)> 2/2 cache hits/lookups in * seconds (glob)
114 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2 with 3 tags (glob)
114 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2 with 3 tags
115 1970/01/01 00:00:00 bob (*)> --hidden tags exited 0 after * seconds (glob)
115 1970/01/01 00:00:00 bob (5000)> --hidden tags exited 0 after * seconds (glob)
116 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob)
116 1970/01/01 00:00:00 bob (5000)> blackbox -l 5
@@ -137,12 +137,12 b' Tag cache debug info written to blackbox'
137 $ hg identify
137 $ hg identify
138 b9154636be93 tip
138 b9154636be93 tip
139 $ hg blackbox -l 6
139 $ hg blackbox -l 6
140 1970/01/01 00:00:00 bob (*)> identify (glob)
140 1970/01/01 00:00:00 bob (5000)> identify
141 1970/01/01 00:00:00 bob (*)> writing 48 bytes to cache/hgtagsfnodes1 (glob)
141 1970/01/01 00:00:00 bob (5000)> writing 48 bytes to cache/hgtagsfnodes1
142 1970/01/01 00:00:00 bob (*)> 0/1 cache hits/lookups in * seconds (glob)
142 1970/01/01 00:00:00 bob (5000)> 0/1 cache hits/lookups in * seconds (glob)
143 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
143 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
144 1970/01/01 00:00:00 bob (*)> identify exited 0 after * seconds (glob)
144 1970/01/01 00:00:00 bob (5000)> identify exited 0 after * seconds (glob)
145 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
145 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
146
146
147 Failure to acquire lock results in no write
147 Failure to acquire lock results in no write
148
148
@@ -151,12 +151,12 b' Failure to acquire lock results in no wr'
151 $ hg identify
151 $ hg identify
152 b9154636be93 tip
152 b9154636be93 tip
153 $ hg blackbox -l 6
153 $ hg blackbox -l 6
154 1970/01/01 00:00:00 bob (*)> identify (glob)
154 1970/01/01 00:00:00 bob (5000)> identify
155 1970/01/01 00:00:00 bob (*)> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired (glob)
155 1970/01/01 00:00:00 bob (5000)> not writing .hg/cache/hgtagsfnodes1 because lock cannot be acquired
156 1970/01/01 00:00:00 bob (*)> 0/1 cache hits/lookups in * seconds (glob)
156 1970/01/01 00:00:00 bob (5000)> 0/1 cache hits/lookups in * seconds (glob)
157 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
157 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
158 1970/01/01 00:00:00 bob (*)> identify exited 0 after * seconds (glob)
158 1970/01/01 00:00:00 bob (5000)> identify exited 0 after * seconds (glob)
159 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
159 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
160
160
161 $ fnodescacheexists
161 $ fnodescacheexists
162 no fnodes cache
162 no fnodes cache
@@ -351,12 +351,12 b' Extra junk data at the end should get ov'
351 bar 1:78391a272241
351 bar 1:78391a272241
352
352
353 $ hg blackbox -l 6
353 $ hg blackbox -l 6
354 1970/01/01 00:00:00 bob (*)> tags (glob)
354 1970/01/01 00:00:00 bob (5000)> tags
355 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
355 1970/01/01 00:00:00 bob (5000)> writing 24 bytes to cache/hgtagsfnodes1
356 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
356 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
357 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
357 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
358 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
358 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
359 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
359 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
360
360
361 #if unix-permissions no-root
361 #if unix-permissions no-root
362 Errors writing to .hgtags fnodes cache are silently ignored
362 Errors writing to .hgtags fnodes cache are silently ignored
@@ -372,12 +372,12 b' Errors writing to .hgtags fnodes cache a'
372 bar 1:78391a272241
372 bar 1:78391a272241
373
373
374 $ hg blackbox -l 6
374 $ hg blackbox -l 6
375 1970/01/01 00:00:00 bob (*)> tags (glob)
375 1970/01/01 00:00:00 bob (5000)> tags
376 1970/01/01 00:00:00 bob (*)> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1' (glob)
376 1970/01/01 00:00:00 bob (5000)> couldn't write cache/hgtagsfnodes1: [Errno 13] Permission denied: '$TESTTMP/t2/.hg/cache/hgtagsfnodes1' (glob)
377 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
377 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
378 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
378 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
379 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
379 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
380 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
380 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
381
381
382 $ chmod a+w .hg/cache/hgtagsfnodes1
382 $ chmod a+w .hg/cache/hgtagsfnodes1
383
383
@@ -387,12 +387,12 b' Errors writing to .hgtags fnodes cache a'
387 bar 1:78391a272241
387 bar 1:78391a272241
388
388
389 $ hg blackbox -l 6
389 $ hg blackbox -l 6
390 1970/01/01 00:00:00 bob (*)> tags (glob)
390 1970/01/01 00:00:00 bob (5000)> tags
391 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
391 1970/01/01 00:00:00 bob (5000)> writing 24 bytes to cache/hgtagsfnodes1
392 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
392 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
393 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
393 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
394 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
394 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
395 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
395 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
396
396
397 $ f --size .hg/cache/hgtagsfnodes1
397 $ f --size .hg/cache/hgtagsfnodes1
398 .hg/cache/hgtagsfnodes1: size=168
398 .hg/cache/hgtagsfnodes1: size=168
@@ -416,11 +416,11 b" Stripping doesn't truncate the tags cach"
416 bar 1:78391a272241
416 bar 1:78391a272241
417
417
418 $ hg blackbox -l 5
418 $ hg blackbox -l 5
419 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
419 1970/01/01 00:00:00 bob (5000)> writing 24 bytes to cache/hgtagsfnodes1
420 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
420 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
421 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
421 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
422 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
422 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
423 1970/01/01 00:00:00 bob (*)> blackbox -l 5 (glob)
423 1970/01/01 00:00:00 bob (5000)> blackbox -l 5
424
424
425 $ f --size .hg/cache/hgtagsfnodes1
425 $ f --size .hg/cache/hgtagsfnodes1
426 .hg/cache/hgtagsfnodes1: size=120
426 .hg/cache/hgtagsfnodes1: size=120
@@ -433,12 +433,12 b" Stripping doesn't truncate the tags cach"
433 bar 1:78391a272241
433 bar 1:78391a272241
434
434
435 $ hg blackbox -l 6
435 $ hg blackbox -l 6
436 1970/01/01 00:00:00 bob (*)> tags (glob)
436 1970/01/01 00:00:00 bob (5000)> tags
437 1970/01/01 00:00:00 bob (*)> writing 24 bytes to cache/hgtagsfnodes1 (glob)
437 1970/01/01 00:00:00 bob (5000)> writing 24 bytes to cache/hgtagsfnodes1
438 1970/01/01 00:00:00 bob (*)> 2/3 cache hits/lookups in * seconds (glob)
438 1970/01/01 00:00:00 bob (5000)> 2/3 cache hits/lookups in * seconds (glob)
439 1970/01/01 00:00:00 bob (*)> writing .hg/cache/tags2-visible with 1 tags (glob)
439 1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 1 tags
440 1970/01/01 00:00:00 bob (*)> tags exited 0 after * seconds (glob)
440 1970/01/01 00:00:00 bob (5000)> tags exited 0 after * seconds (glob)
441 1970/01/01 00:00:00 bob (*)> blackbox -l 6 (glob)
441 1970/01/01 00:00:00 bob (5000)> blackbox -l 6
442 $ f --size .hg/cache/hgtagsfnodes1
442 $ f --size .hg/cache/hgtagsfnodes1
443 .hg/cache/hgtagsfnodes1: size=144
443 .hg/cache/hgtagsfnodes1: size=144
444
444
General Comments 0
You need to be logged in to leave comments. Login now