summaryrefslogtreecommitdiff
path: root/tests/run-nm-self.sh
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2014-01-16 13:48:24 +0100
committerMark Wielaard <mjw@redhat.com>2014-01-20 11:11:16 +0100
commitc80375d5d61f44795f9650bdde08dab4c064c2b5 (patch)
treef3510e6ed8183c03a22bc430e719d2e4c0089880 /tests/run-nm-self.sh
parentd7cffa77ae9eb28a682e436251ab79e86b4e4f64 (diff)
downloadelfutils-c80375d5d61f44795f9650bdde08dab4c064c2b5.tar.gz
tests: Reduce the total number of self-test files and add ET_REL files.
Some self tests would run for a really long time (especially under valgrind) because we included all libebl backends in the list (there are 12 backends). Now only test two explicitly. Also there were no ET_REL files in the self test file list. So add two ET_REL files. The total number of self test files is now 12. run-nm-self.sh would run 4 * 3 * 3 * 22 = 792 tests (on all self test files). Reduce the number of different files to test to 3 (one ET_EXEC, one ET_DYN and one ET_REL file). Reducing the number of test runs to 99. Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'tests/run-nm-self.sh')
-rwxr-xr-xtests/run-nm-self.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/run-nm-self.sh b/tests/run-nm-self.sh
index d2c12465..dac8e27b 100755
--- a/tests/run-nm-self.sh
+++ b/tests/run-nm-self.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2012 Red Hat, Inc.
+# Copyright (C) 2012, 2014 Red Hat, Inc.
# This file is part of elfutils.
#
# This file is free software; you can redistribute it and/or modify
@@ -17,10 +17,20 @@
. $srcdir/test-subr.sh
+# Test different command line combinations on the nm binary itself.
+# Test on nm ET_REL, ET_EXEC and ET_DYN files.
+ET_REL=${abs_top_builddir}/src/nm.o
+ET_EXEC=${abs_top_builddir}/src/nm
+ET_DYN=${abs_top_builddir}/libelf/libelf.so
for what_arg in --debug-syms --defined-only --dynamic --extern-only; do
for format_arg in --format=bsd --format=sysv --format=posix; do
for out_arg in --numeric-sort --no-sort --reverse-sort; do
- testrun_on_self_quiet ${abs_top_builddir}/src/nm $what_arg $format_arg $out_arg
+ for self_file in $ET_REL $ET_EXEC $ET_DYN; do
+ # --dynamic doesn't make sense for ET_REL.
+ if ! test "$what_arg" == "--dynamic" -a "$self_file" == "$ET_REL"; then
+ testrun ${abs_top_builddir}/src/nm $what_arg $format_arg $out_arg $self_file > /dev/null
+ fi
+ done
done
done
done