summaryrefslogtreecommitdiff
path: root/init.cfg
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-03-27 12:51:43 +0000
committerPádraig Brady <P@draigBrady.com>2013-04-04 03:02:10 +0100
commite92d16f68a97575ed7112204b069514edc8d54a0 (patch)
treea3d9089c0eddddba5cb96c78433ed513f4ec15f7 /init.cfg
parent7abf99e1907b1b05cb45eacaa98bfa73efe0ab92 (diff)
downloadcoreutils-e92d16f68a97575ed7112204b069514edc8d54a0.tar.xz
tests: avoid shared lib tests on unsupported platforms
* init.cfg (require_gcc_shared_): A new function to check that we can build shared libraries in the particular manner we use in our tests. * tests/cp/nfs-removal-race.sh: Use require_gcc_shared_. Then fail rather than skip, if the actual shared lib build fails. * tests/df/no-mtab-status.sh: Likewise. * tests/df/skip-duplicates.sh: Likewise. * tests/ls/getxattr-speedup.sh: Likewise. Reported in http://bugs.gnu.org/14024
Diffstat (limited to 'init.cfg')
-rw-r--r--init.cfg9
1 files changed, 9 insertions, 0 deletions
diff --git a/init.cfg b/init.cfg
index afee93077..093cd8586 100644
--- a/init.cfg
+++ b/init.cfg
@@ -466,6 +466,15 @@ require_sparse_support_()
fi
}
+# There are a myriad of ways to build shared libs,
+# so we only consider running tests requiring shared libs,
+# on platforms that support building them as follows.
+require_gcc_shared_()
+{
+ $CC -shared -fPIC -O2 -xc -o d.so -ldl - < /dev/null 2>&1 \
+ || skip_ '$CC -shared ... failed to build a shared lib'
+}
+
mkfifo_or_skip_()
{
test $# = 1 || framework_failure_