mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 14:58:03 +03:00
test: add sort to all find commands
Summary: Turns out the find output is not deterministic, so it was producing different results in some environments. Let's throw in a sort call for all find output. Test Plan: Ran the tests Reviewers: mitrandir, #mercurial Differential Revision: https://phabricator.intern.facebook.com/D3306533
This commit is contained in:
parent
56411349f7
commit
65a4e0eab6
@ -32,24 +32,24 @@
|
||||
$ lastweek=`python -c 'import datetime,time; print datetime.datetime.fromtimestamp(time.time() - (86400 * 7)).strftime("%y%m%d%H%M")'`
|
||||
$ find $CACHEDIR -type f -exec touch -t $lastweek {} \;
|
||||
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos (glob)
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/48023ec064c1d522f0d792a5a912bb1bf7859a4a (glob)
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1406e74118627694268417491f018a4a883152f0 (glob)
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/48023ec064c1d522f0d792a5a912bb1bf7859a4a (glob)
|
||||
$TESTTMP/hgcache/repos (glob)
|
||||
$ hg gc
|
||||
finished: removed 1 of 2 files (0.00 GB to 0.00 GB)
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/48023ec064c1d522f0d792a5a912bb1bf7859a4a (glob)
|
||||
$TESTTMP/hgcache/repos
|
||||
|
||||
# gc server cache
|
||||
|
||||
$ find master/.hg/remotefilelogcache -type f
|
||||
master/.hg/remotefilelogcache/x/48023ec064c1d522f0d792a5a912bb1bf7859a4a (glob)
|
||||
$ find master/.hg/remotefilelogcache -type f | sort
|
||||
master/.hg/remotefilelogcache/x/1406e74118627694268417491f018a4a883152f0 (glob)
|
||||
master/.hg/remotefilelogcache/x/48023ec064c1d522f0d792a5a912bb1bf7859a4a (glob)
|
||||
$ hg gc master
|
||||
finished: removed 0 of 1 files (0.00 GB to 0.00 GB)
|
||||
$ find master/.hg/remotefilelogcache -type f
|
||||
$ find master/.hg/remotefilelogcache -type f | sort
|
||||
master/.hg/remotefilelogcache/x/48023ec064c1d522f0d792a5a912bb1bf7859a4a (glob)
|
||||
|
||||
$ cp $CACHEDIR/repos $CACHEDIR/repos.bak
|
||||
|
@ -185,7 +185,7 @@
|
||||
$ clearcache
|
||||
$ hg prefetch -r . --config remotefilelog.fetchpacks=True
|
||||
3 files fetched over 1 fetches - (0 misses, 100.00% hit ratio) over * (glob)
|
||||
$ find $TESTTMP/hgcache -type f
|
||||
$ find $TESTTMP/hgcache -type f | sort
|
||||
$TESTTMP/hgcache/master/packs/8c654541e4f20141a894bbfe428e36fc92202e39.dataidx
|
||||
$TESTTMP/hgcache/master/packs/8c654541e4f20141a894bbfe428e36fc92202e39.datapack
|
||||
$TESTTMP/hgcache/master/packs/bc793de8656fc1534908d4d69fd4448c1cb00e91.histidx
|
||||
|
@ -19,18 +19,18 @@
|
||||
# Test that repack cleans up the old files and creates new packs
|
||||
|
||||
$ cd shallow
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/aee31534993a501858fb6dd96a065671922e7d51
|
||||
$TESTTMP/hgcache/repos
|
||||
|
||||
$ hg repack
|
||||
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos
|
||||
$TESTTMP/hgcache/master/packs/bc0153a5326a2f0bcae9f659ad3376c04350119f.histidx
|
||||
$TESTTMP/hgcache/master/packs/bc0153a5326a2f0bcae9f659ad3376c04350119f.histpack
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/packs/817d294043bd21a3de01f807721971abe45219ce.dataidx
|
||||
$TESTTMP/hgcache/master/packs/817d294043bd21a3de01f807721971abe45219ce.datapack
|
||||
$TESTTMP/hgcache/master/packs/bc0153a5326a2f0bcae9f659ad3376c04350119f.histidx
|
||||
$TESTTMP/hgcache/master/packs/bc0153a5326a2f0bcae9f659ad3376c04350119f.histpack
|
||||
$TESTTMP/hgcache/repos
|
||||
|
||||
# Test that the packs are readonly
|
||||
$ ls -l $CACHEDIR/master/packs
|
||||
@ -56,22 +56,22 @@
|
||||
$ hg up -q tip
|
||||
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
|
||||
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos
|
||||
$TESTTMP/hgcache/master/packs/bc0153a5326a2f0bcae9f659ad3376c04350119f.histidx
|
||||
$TESTTMP/hgcache/master/packs/bc0153a5326a2f0bcae9f659ad3376c04350119f.histpack
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216
|
||||
$TESTTMP/hgcache/master/packs/817d294043bd21a3de01f807721971abe45219ce.dataidx
|
||||
$TESTTMP/hgcache/master/packs/817d294043bd21a3de01f807721971abe45219ce.datapack
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216
|
||||
$TESTTMP/hgcache/master/packs/bc0153a5326a2f0bcae9f659ad3376c04350119f.histidx
|
||||
$TESTTMP/hgcache/master/packs/bc0153a5326a2f0bcae9f659ad3376c04350119f.histpack
|
||||
$TESTTMP/hgcache/repos
|
||||
|
||||
$ hg repack --traceback
|
||||
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histidx
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histpack
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/packs/1e386660a2bca1c6949a1cbf5b095765e98fd241.dataidx
|
||||
$TESTTMP/hgcache/master/packs/1e386660a2bca1c6949a1cbf5b095765e98fd241.datapack
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histidx
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histpack
|
||||
$TESTTMP/hgcache/repos
|
||||
|
||||
# Verify all the file data is still available
|
||||
$ hg cat -r . x
|
||||
@ -85,12 +85,12 @@
|
||||
# Test that repacking again without new data does not delete the pack files
|
||||
# and did not change the pack names
|
||||
$ hg repack
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histidx
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histpack
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/packs/1e386660a2bca1c6949a1cbf5b095765e98fd241.dataidx
|
||||
$TESTTMP/hgcache/master/packs/1e386660a2bca1c6949a1cbf5b095765e98fd241.datapack
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histidx
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histpack
|
||||
$TESTTMP/hgcache/repos
|
||||
|
||||
# Run two repacks at once
|
||||
$ hg repack --config "hooks.prerepack=sleep 2" &
|
||||
@ -107,21 +107,21 @@
|
||||
$ hg pull -q
|
||||
$ hg up -q tip
|
||||
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histidx
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histpack
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1bb2e6237e035c8f8ef508e281f1ce075bc6db72
|
||||
$TESTTMP/hgcache/master/packs/1e386660a2bca1c6949a1cbf5b095765e98fd241.dataidx
|
||||
$TESTTMP/hgcache/master/packs/1e386660a2bca1c6949a1cbf5b095765e98fd241.datapack
|
||||
$TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1bb2e6237e035c8f8ef508e281f1ce075bc6db72
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histidx
|
||||
$TESTTMP/hgcache/master/packs/3ed57673383638cd7c2c873a5a00a1f40f26b0b8.histpack
|
||||
$TESTTMP/hgcache/repos
|
||||
$ hg repack --background
|
||||
$ sleep 2
|
||||
$ find $CACHEDIR -type f
|
||||
$TESTTMP/hgcache/repos
|
||||
$ find $CACHEDIR -type f | sort
|
||||
$TESTTMP/hgcache/master/packs/3bebfba849e7aed8e598b92b296aeaff4784393b.histidx
|
||||
$TESTTMP/hgcache/master/packs/3bebfba849e7aed8e598b92b296aeaff4784393b.histpack
|
||||
$TESTTMP/hgcache/master/packs/92a06d8b76a23b6e6150cf877ea75ed993e0b2d8.dataidx
|
||||
$TESTTMP/hgcache/master/packs/92a06d8b76a23b6e6150cf877ea75ed993e0b2d8.datapack
|
||||
$TESTTMP/hgcache/repos
|
||||
|
||||
# Test debug commands
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user