test-glog: avoid check-code violation after next patch
authorAugie Fackler <raf@durin42.com>
Tue, 29 Dec 2015 18:11:14 -0500
changeset 27556 1df9b8b2abda
parent 27554 1c66497261b2
child 27557 28b5c4fcf48d
test-glog: avoid check-code violation after next patch Danek's patch will help us avoid spurious test breakages on Solaris. This test wasn't broken on Solaris because of the grep(1) use, but it will upset check-code. Use cmp to silence check-code since it doesn't matter.
tests/test-glog.t
--- a/tests/test-glog.t	Tue Dec 29 00:48:03 2015 +0900
+++ b/tests/test-glog.t	Tue Dec 29 18:11:14 2015 -0500
@@ -1429,7 +1429,8 @@
   >     | sed 's/.*nodetag/nodetag/' > log.nodes
   >   hg log -G --template 'nodetag {rev}\n' "$@" | grep nodetag \
   >     | sed 's/.*nodetag/nodetag/' > glog.nodes
-  >   diff -u log.nodes glog.nodes | grep '^[-+@ ]' || :
+  >   (cmp log.nodes glog.nodes || diff -u log.nodes glog.nodes) \
+  >     | grep '^[-+@ ]' || :
   > }
 
 glog always reorders nodes which explains the difference with log