Mercurial > hg
comparison tests/test-remotefilelog-gcrepack.t @ 50725:7e5be4a7cda7 stable
tests: use grep -E instead of obsolescent egrep
Testing on Fedora 38 failed with:
egrep: warning: egrep is obsolescent; using grep -E
The warning comes from
https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1
. For further anecdotal evidence of the change, see
https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep .
This reverses the code check that goes back to e7d3b509af8b. grep -E is POSIX,
but there is a risk that it doesn't work the same on all platforms - especially
older Unix versions. It should however always be possible to put a GNU grep in
$PATH before running the tests.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 26 Jun 2023 14:34:58 +0200 |
parents | 4f40dc190f63 |
children |
comparison
equal
deleted
inserted
replaced
50724:a10d823a8e3d | 50725:7e5be4a7cda7 |
---|---|
39 | 39 |
40 $ hg prefetch | 40 $ hg prefetch |
41 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) | 41 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
42 $ hg repack | 42 $ hg repack |
43 | 43 |
44 $ find $CACHEDIR | sort | egrep ".datapack|.histpack" | 44 $ find $CACHEDIR | sort | grep -E ".datapack|.histpack" |
45 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack | 45 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack |
46 $TESTTMP/hgcache/master/packs/dc8f8fdc76690ce27791ce9f53a18da379e50d37.datapack | 46 $TESTTMP/hgcache/master/packs/dc8f8fdc76690ce27791ce9f53a18da379e50d37.datapack |
47 | 47 |
48 # Ensure that all file versions were prefetched | 48 # Ensure that all file versions were prefetched |
49 | 49 |
70 > nodettl=86400 | 70 > nodettl=86400 |
71 > EOF | 71 > EOF |
72 | 72 |
73 $ hg repack | 73 $ hg repack |
74 | 74 |
75 $ find $CACHEDIR | sort | egrep ".datapack|.histpack" | 75 $ find $CACHEDIR | sort | grep -E ".datapack|.histpack" |
76 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack | 76 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack |
77 $TESTTMP/hgcache/master/packs/a4e1d094ec2aee8a08a4d6d95a13c634cc7d7394.datapack | 77 $TESTTMP/hgcache/master/packs/a4e1d094ec2aee8a08a4d6d95a13c634cc7d7394.datapack |
78 | 78 |
79 # Ensure that file 'x' was garbage collected. It should be GCed because it is not in the keepset | 79 # Ensure that file 'x' was garbage collected. It should be GCed because it is not in the keepset |
80 # and is old (commit date is 0.0 in tests). Ensure that file 'y' is present as it is in the keepset. | 80 # and is old (commit date is 0.0 in tests). Ensure that file 'y' is present as it is in the keepset. |
96 | 96 |
97 $ hg prefetch | 97 $ hg prefetch |
98 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) | 98 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
99 $ hg repack | 99 $ hg repack |
100 | 100 |
101 $ find $CACHEDIR | sort | egrep ".datapack|.histpack" | 101 $ find $CACHEDIR | sort | grep -E ".datapack|.histpack" |
102 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack | 102 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack |
103 $TESTTMP/hgcache/master/packs/dc8f8fdc76690ce27791ce9f53a18da379e50d37.datapack | 103 $TESTTMP/hgcache/master/packs/dc8f8fdc76690ce27791ce9f53a18da379e50d37.datapack |
104 | 104 |
105 # Ensure that all file versions were prefetched | 105 # Ensure that all file versions were prefetched |
106 | 106 |
128 > nodettl=$(($(date +%s) + 100)) | 128 > nodettl=$(($(date +%s) + 100)) |
129 > EOF | 129 > EOF |
130 | 130 |
131 $ hg repack | 131 $ hg repack |
132 | 132 |
133 $ find $CACHEDIR | sort | egrep ".datapack|.histpack" | 133 $ find $CACHEDIR | sort | grep -E ".datapack|.histpack" |
134 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack | 134 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack |
135 $TESTTMP/hgcache/master/packs/dc8f8fdc76690ce27791ce9f53a18da379e50d37.datapack | 135 $TESTTMP/hgcache/master/packs/dc8f8fdc76690ce27791ce9f53a18da379e50d37.datapack |
136 | 136 |
137 # Ensure that all file versions were prefetched | 137 # Ensure that all file versions were prefetched |
138 | 138 |