mirror of
https://github.com/facebook/sapling.git
synced 2024-12-29 08:02:24 +03:00
rotatelog: fix tests on windows
Summary: The tests weren't windows compatible. Let's get rid of the path separators. Reviewed By: quark-zju, singhsrb Differential Revision: D23170573 fbshipit-source-id: f934691cd2891205442885a12debe3a28d275fc5
This commit is contained in:
parent
526aac3aa2
commit
36a49b9b2b
@ -28,45 +28,45 @@
|
||||
Test max-bytes-per-log
|
||||
$ clone master shallow2 --noupdate
|
||||
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep 'datastore.*log')
|
||||
-rw-rw-r-- 12 $TESTTMP/hgcache/master/indexedlogdatastore/0/log
|
||||
* 12 *0* (glob)
|
||||
$ cd shallow2
|
||||
|
||||
$ setconfig indexedlog.data.max-bytes-per-log=10
|
||||
$ hg up -q 0
|
||||
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep 'datastore.*log')
|
||||
-rw-rw-r-- 70 $TESTTMP/hgcache/master/indexedlogdatastore/0/log
|
||||
-rw-rw-r-- 12 $TESTTMP/hgcache/master/indexedlogdatastore/1/log
|
||||
* 70 *0* (glob)
|
||||
* 12 *1* (glob)
|
||||
$ hg up -q 1
|
||||
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep 'datastore.*log')
|
||||
-rw-rw-r-- 70 $TESTTMP/hgcache/master/indexedlogdatastore/0/log
|
||||
-rw-rw-r-- 70 $TESTTMP/hgcache/master/indexedlogdatastore/1/log
|
||||
-rw-rw-r-- 12 $TESTTMP/hgcache/master/indexedlogdatastore/2/log
|
||||
* 70 *0* (glob)
|
||||
* 70 *1* (glob)
|
||||
* 12 *2* (glob)
|
||||
$ hg up -q 2
|
||||
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep 'datastore.*log')
|
||||
-rw-rw-r-- 70 $TESTTMP/hgcache/master/indexedlogdatastore/0/log
|
||||
-rw-rw-r-- 70 $TESTTMP/hgcache/master/indexedlogdatastore/1/log
|
||||
-rw-rw-r-- 70 $TESTTMP/hgcache/master/indexedlogdatastore/2/log
|
||||
-rw-rw-r-- 12 $TESTTMP/hgcache/master/indexedlogdatastore/3/log
|
||||
* 70 *0* (glob)
|
||||
* 70 *1* (glob)
|
||||
* 70 *2* (glob)
|
||||
* 12 *3* (glob)
|
||||
|
||||
$ setconfig indexedlog.data.max-bytes-per-log=100
|
||||
$ hg up -q null
|
||||
$ clearcache
|
||||
$ rm -rf $CACHEDIR/master
|
||||
|
||||
$ hg up -q 0
|
||||
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep 'datastore.*log')
|
||||
-rw-rw-r-- 70 $TESTTMP/hgcache/master/indexedlogdatastore/0/log
|
||||
* * *0* (glob)
|
||||
$ hg up -q 1
|
||||
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep 'datastore.*log')
|
||||
-rw-rw-r-- 128 $TESTTMP/hgcache/master/indexedlogdatastore/0/log
|
||||
-rw-rw-r-- 12 $TESTTMP/hgcache/master/indexedlogdatastore/1/log
|
||||
* 128 *0* (glob)
|
||||
* 12 *1* (glob)
|
||||
$ hg up -q 2
|
||||
$ ls_l $(findfilessorted $CACHEDIR/master/ | grep 'datastore.*log')
|
||||
-rw-rw-r-- 128 $TESTTMP/hgcache/master/indexedlogdatastore/0/log
|
||||
-rw-rw-r-- 70 $TESTTMP/hgcache/master/indexedlogdatastore/1/log
|
||||
* 128 *0* (glob)
|
||||
* 70 *1* (glob)
|
||||
|
||||
Test max-log-count
|
||||
$ hg up -q null
|
||||
$ clearcache
|
||||
$ rm -rf $CACHEDIR/master
|
||||
$ setconfig indexedlog.data.max-bytes-per-log=10 indexedlog.data.max-log-count=3
|
||||
$ hg up -q 0
|
||||
$ findfilessorted $CACHEDIR/master/ | grep 'datastore.*log' | wc -l | sed -e 's/ //g'
|
||||
|
Loading…
Reference in New Issue
Block a user