1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-19 18:26:32 +02:00

tests: wrap the valgrind-requiring assertion in a function

* tests/init.cfg (require_valgrind_): New function...
* tests/misc/sort-stale-thread-mem: ...extracted from here.
This commit is contained in:
Jim Meyering
2012-08-18 07:25:28 +02:00
parent 574b7c7dbe
commit b8104e47ca
2 changed files with 7 additions and 1 deletions

View File

@@ -160,6 +160,12 @@ require_strace_()
fi
}
# Skip the current test if valgrind doesn't work.
require_valgrind_()
{
valgrind --help >/dev/null || skip_ "requires valgrind"
}
require_setfacl_()
{
setfacl -m user::rwx . \

View File

@@ -22,8 +22,8 @@
print_ver_ sort
very_expensive_
require_valgrind_
valgrind --help >/dev/null || skip_ "requires valgrind"
grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null ||
skip_ 'requires pthreads'