]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Simply compare_file function
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 8 Oct 2012 19:06:08 +0000 (21:06 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 8 Oct 2012 19:06:08 +0000 (21:06 +0200)
test.sh

diff --git a/test.sh b/test.sh
index ee723bb6d3aaef2068f942c92f39e971ab208258..41caf6b94856a7fa0cfa86e050d447acd0c86d33 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -81,10 +81,7 @@ checkstat() {
 }
 
 compare_file() {
-    cmp -s "$1" "$2"
-    if [ $? -eq 0 ]; then
-        :
-    else
+    if ! cmp -s "$1" "$2"; then
         test_failed "Files differ: $1 != $2"
     fi
 }