sapling/tests/test-fb-hgext-fastmanifest-blackbox.t
Saurabh Singh 5a62bbf298 fastmanifest: move fastmanifest tests from fb-hgext/tests to tests/
Summary: Now that D6685044 moved fastmanifest, we can also move the tests. Note
that test-fb-hgext-fastmanifest.t was moved seprately by Durham.

Test Plan: Ran all the tests.

Reviewers: quark, #mercurial, #sourcecontrol

Reviewed By: quark

Subscribers: durham, quark

Differential Revision: https://phabricator.intern.facebook.com/D6686584

Signature: 6686584:1515531785:3a9fa022f443faed6f3110eeef22d8ea72fcee3f
2018-01-09 14:21:39 -08:00

57 lines
1.5 KiB
Raku

Setup
$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
$ export PYTHONPATH
Check diagnosis, debugging information
1) Setup configuration
$ mkcommit() {
> echo "$1" > "$1"
> hg add "$1"
> echo "add $1" > msg
> echo "" >> msg
> hg ci -l msg
> }
2) Set up the repo
$ mkdir cachetesting
$ cd cachetesting
$ hg init
$ cat >> .hg/hgrc << EOF
> [extensions]
> fastmanifest=
> blackbox=
> [blackbox]
> maxfiles=1
> maxsize=5242880
> track=fastmanifest
> [fastmanifest]
> cacheonchange=True
> cachecutoffdays=-1
> randomorder=False
> EOF
$ mkcommit a
$ mkcommit b
$ mkcommit c
$ mkcommit d
$ cat .hg/blackbox.log | grep "FM" | sed "s/.*)>//g" | grep -v "running"
FM: caching trigger: commit
FM: triggering caching for $TESTTMP/cachetesting
FM: trying to cache [0]
FM: cached(rev,man) 0->a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
FM: caching trigger: commit
FM: triggering caching for $TESTTMP/cachetesting
FM: trying to cache [1, 0]
FM: cached(rev,man) 1->a539ce0c1a22b0ecf34498f9f5ce8ea56df9ecb7
FM: skip(rev, man) 0->a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
FM: caching trigger: commit
FM: triggering caching for $TESTTMP/cachetesting
FM: trying to cache [2, 1, 0]
FM: cached(rev,man) 2->e3738bf5439958f89499a656982023aba57b076e
FM: skip(rev, man) 1->a539ce0c1a22b0ecf34498f9f5ce8ea56df9ecb7
FM: skip(rev, man) 0->a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
FM: caching trigger: commit
FM: triggering caching for $TESTTMP/cachetesting