]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: add a unified diff option
authorMatthew Kent <mkent@magoazul.com>
Tue, 30 Dec 2008 22:33:24 +0000 (23:33 +0100)
committerChristoph Hellwig <hch@brick.lst.de>
Tue, 30 Dec 2008 22:33:24 +0000 (23:33 +0100)
Add the -udiff option to the test driver to make test output more
easily readable.

[hch:  made -udiff the default]

Reviewed-by: Christoph Hellwig <hch@lst.de>
common

diff --git a/common b/common
index 267fce3840542d186dbf130701819f22df5fbac7..92ec9e2cab334a83bf1515a07b2f21b6805484bc 100644 (file)
--- a/common
+++ b/common
@@ -19,7 +19,7 @@ _setenvironment
 
 check=${check-true}
 
-diff=diff
+diff="diff -u"
 verbose=false
 group=false
 xgroup=false
@@ -105,8 +105,9 @@ check options
     -xfs                test XFS (default)
     -udf                test UDF
     -nfs                test NFS
-    -l                 line mode diff (default)
+    -l                 line mode diff
     -xdiff             graphical mode diff
+    -udiff             show unified diff (default)
     -n                 show me, do not run tests
     -q                 quick [deprecated]
     -T                 output timestamps
@@ -141,7 +142,8 @@ testlist options
            xpand=false
            ;;
 
-       -l)     # line mode for diff, default now, keep for backward compat
+       -l)     # line mode for diff, was default before
+           diff="diff"
            xpand=false
            ;;
 
@@ -157,6 +159,11 @@ testlist options
            fi
            ;;
 
+       -udiff) # show a unified diff, default now, keep for backward compat
+           xpand=false
+           diff="$diff -u"
+           ;;
+
        -q)     # "quick", no longer used - always quick :-)
            xpand=false
            ;;