coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coreutils] [PATCH] tests: output --version of program under test


From: Eric Blake
Subject: [coreutils] [PATCH] tests: output --version of program under test
Date: Fri, 1 Oct 2010 15:46:13 -0600

This touches all new tests added since commit b062bbd9, when
init.cfg was added.  Older tests still exist that could use
conversion, but we can address those later.

* tests/sample-test: Restore hint for --version output.
* tests/misc/stat-birthtime: Include --version if verbose.
* tests/misc/tr-case-class: Likewise.
* tests/misc/stat-mount: Likewise.
* tests/misc/sort-unique: Likewise.
* tests/misc/sort-benchmark-random: Likewise.
Suggested by Jim Meyering.
---

>> If we retain it, it would have to go *after* the path_prepend_ invocation.
>>
>>      test "$VERBOSE" = yes&&  FIXME --version
>>
>> What do you think?

>I'll add that back to the template, and to the last few recently-added tests.

 tests/misc/sort-benchmark-random |    1 +
 tests/misc/sort-unique           |    8 ++------
 tests/misc/stat-birthtime        |    1 +
 tests/misc/stat-mount            |    1 +
 tests/misc/tr-case-class         |    1 +
 tests/sample-test                |    2 ++
 6 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/misc/sort-benchmark-random b/tests/misc/sort-benchmark-random
index 3325381..1355344 100755
--- a/tests/misc/sort-benchmark-random
+++ b/tests/misc/sort-benchmark-random
@@ -19,6 +19,7 @@
 # Written by Glen Lenker.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version

 very_expensive_

diff --git a/tests/misc/sort-unique b/tests/misc/sort-unique
index e186d34..e659feb 100755
--- a/tests/misc/sort-unique
+++ b/tests/misc/sort-unique
@@ -16,12 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-if test "$VERBOSE" = yes; then
-  set -x
-  sort --version
-fi
-
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && sort --version

 cat > in <<\EOF
 1
diff --git a/tests/misc/stat-birthtime b/tests/misc/stat-birthtime
index 38e5d59..4490ee8 100755
--- a/tests/misc/stat-birthtime
+++ b/tests/misc/stat-birthtime
@@ -17,6 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && stat --version

 # Whether birthtime is supported or not, it better not change even when
 # [acm]time are modified.  :)
diff --git a/tests/misc/stat-mount b/tests/misc/stat-mount
index a99291f..039ce50 100755
--- a/tests/misc/stat-mount
+++ b/tests/misc/stat-mount
@@ -17,6 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && stat --version

 df_mnt=$(df -P . | sed -n '2s/.* \([^ ]*$\)/\1/p')
 stat_mnt=$(stat -c%m .) || fail=1
diff --git a/tests/misc/tr-case-class b/tests/misc/tr-case-class
index d81c676..14c6b0e 100755
--- a/tests/misc/tr-case-class
+++ b/tests/misc/tr-case-class
@@ -17,6 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && tr --version

 # Ensure we support translation of case classes with extension
 echo '01234567899999999999999999' > exp
diff --git a/tests/sample-test b/tests/sample-test
index 85b779f..51408ce 100644
--- a/tests/sample-test
+++ b/tests/sample-test
@@ -17,6 +17,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
+test "$VERBOSE" = yes && FIXME --version
+
 # FIXME: skip_if_root_
 # FIXME: require_root_

-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]