Submitter | Augie Fackler |
---|---|
Date | July 16, 2015, 4:07 p.m. |
Message ID | <b80cf401f71a66ce6d18.1437062867@imladris.local> |
Download | mbox | patch |
Permalink | /patch/10009/ |
State | Accepted |
Headers | show |
Comments
Queued this series, thanks! On 7/16/15, 9:07 AM, "raf@durin42.com" <raf@durin42.com> wrote: ># HG changeset patch ># User Augie Fackler <augie@google.com> ># Date 1437062837 14400 ># Thu Jul 16 12:07:17 2015 -0400 ># Node ID b80cf401f71a66ce6d18688b40fdbb6917c2fc6e ># Parent 3cf16ed00c9ffabfc1a594fbc37975f598a69fc4 >test-gc: filter wc output as suggested by check-code > >wc's output is not wholly portable: BSD wc likes to prepend some >whitespace. > >diff --git a/tests/test-gc.t b/tests/test-gc.t >--- a/tests/test-gc.t >+++ b/tests/test-gc.t >@@ -32,18 +32,18 @@ > $ 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 | wc -l >+ $ find $CACHEDIR -type f | wc -l | sed -e 's/ //g' > 3 > $ hg gc > finished: removed 1 of 2 files (0.00 GB to 0.00 GB) >- $ find $CACHEDIR -type f | wc -l >+ $ find $CACHEDIR -type f | wc -l | sed -e 's/ //g' > 2 > > # gc server cache > >- $ find master/.hg/remotefilelogcache -type f | wc -l >+ $ find master/.hg/remotefilelogcache -type f | wc -l | sed -e 's/ //g' > 2 > $ hg gc master > finished: removed 0 of 1 files (0.00 GB to 0.00 GB) >- $ find master/.hg/remotefilelogcache -type f | wc -l >+ $ find master/.hg/remotefilelogcache -type f | wc -l | sed -e 's/ //g' > 1
Patch
diff --git a/tests/test-gc.t b/tests/test-gc.t --- a/tests/test-gc.t +++ b/tests/test-gc.t @@ -32,18 +32,18 @@ $ 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 | wc -l + $ find $CACHEDIR -type f | wc -l | sed -e 's/ //g' 3 $ hg gc finished: removed 1 of 2 files (0.00 GB to 0.00 GB) - $ find $CACHEDIR -type f | wc -l + $ find $CACHEDIR -type f | wc -l | sed -e 's/ //g' 2 # gc server cache - $ find master/.hg/remotefilelogcache -type f | wc -l + $ find master/.hg/remotefilelogcache -type f | wc -l | sed -e 's/ //g' 2 $ hg gc master finished: removed 0 of 1 files (0.00 GB to 0.00 GB) - $ find master/.hg/remotefilelogcache -type f | wc -l + $ find master/.hg/remotefilelogcache -type f | wc -l | sed -e 's/ //g' 1