mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 03:12:48 +02:00
* src/du-tests: Clean up a little, though it's still not portable.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2006-10-13 Jim Meyering <jim@meyering.net>
|
2006-10-13 Jim Meyering <jim@meyering.net>
|
||||||
|
|
||||||
|
* src/du-tests: Clean up a little, though it's still not portable.
|
||||||
|
|
||||||
* .vg-suppressions: Add 3 more for debian unstable.
|
* .vg-suppressions: Add 3 more for debian unstable.
|
||||||
|
|
||||||
* tests/ls/Test.pm: Remove long-unused file.
|
* tests/ls/Test.pm: Remove long-unused file.
|
||||||
|
|||||||
16
src/du-tests
16
src/du-tests
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Copyright (C) 2003 Free Software Foundation, Inc.
|
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,11 +18,17 @@
|
|||||||
|
|
||||||
cat - <<\EOF > /dev/null
|
cat - <<\EOF > /dev/null
|
||||||
Invoke e.g., like this
|
Invoke e.g., like this
|
||||||
DU1=du-4.5.2 DU2=du ./du-tests
|
VG_PATH_PREFIX=/cu/src/vg: DU1=/cu/src/du DU2=/usr/bin/du ./du-tests
|
||||||
|
Where /cu/src/vg/du is a valgrind wrapper around du,
|
||||||
|
and DU1 refers to the just-built du binary you want to test.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test -x "$DU1" || { echo DU1 envvar not set; exit 1; }
|
test -z "$DU1" && { echo DU1 envvar not set 1>&2; exit 1; }
|
||||||
test -x "$DU2" || { echo DU2 envvar not set; exit 1; }
|
test -z "$DU2" && { echo DU2 envvar not set 1>&2; exit 1; }
|
||||||
|
|
||||||
|
test -x "$DU1" || { echo $DU1 not executable 1>&2; exit 1; }
|
||||||
|
test -x "$DU2" || { echo $DU2 not executable 1>&2; exit 1; }
|
||||||
|
|
||||||
# Expects $DU1 and $DU2 to be the binaries to compare.
|
# Expects $DU1 and $DU2 to be the binaries to compare.
|
||||||
d1=$(mktemp -d)
|
d1=$(mktemp -d)
|
||||||
cp -a $DU1 $d1/du
|
cp -a $DU1 $d1/du
|
||||||
@@ -47,6 +53,6 @@ for args in \
|
|||||||
; do
|
; do
|
||||||
echo Args: $args ======================
|
echo Args: $args ======================
|
||||||
diff -u --label=$DU1 --label=$DU2 \
|
diff -u --label=$DU1 --label=$DU2 \
|
||||||
<(PATH=$d1 du $args 2>&1) <(PATH=$d2 du $args 2>&1)
|
<(PATH=$VG_PATH_PREFIX$d1 du $args 2>&1) <(PATH=$d2 du $args 2>&1)
|
||||||
done
|
done
|
||||||
rm -rf $d1 $d2
|
rm -rf $d1 $d2
|
||||||
|
|||||||
Reference in New Issue
Block a user