[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: don't use "local" in bourne shell scripts
From: |
Jim Meyering |
Subject: |
[PATCH] tests: don't use "local" in bourne shell scripts |
Date: |
Wed, 10 Sep 2008 13:14:08 +0200 |
I wanted to avoid dumbing down the test scripts,
but the cost is low, so I've gone ahead.
>From 8c6e017ff7c2e1023fd7de83b1da9d495fb24bf7 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 8 Sep 2008 08:23:37 +0200
Subject: [PATCH] tests: don't use "local" in bourne shell scripts
* tests/test-lib.sh (remove_tmp_, skip_if_mcstransd_is_running_):
Avoid failure on Solaris 11, since their /bin/sh passes the tests
in posix-shell.m4, yet does not support "local" (which is not POSIX).
---
tests/test-lib.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index e7ec80e..ceb4eb6 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -246,11 +246,11 @@ skip_if_mcstransd_is_running_()
# When mcstransd is running, you'll see only the 3-component
# version of file-system context strings. Detect that,
# and if it's running, skip this test.
- local ctx=$(stat --printf='%C\n' .) || framework_failure
- case $ctx in
+ __ctx=$(stat --printf='%C\n' .) || framework_failure
+ case $__ctx in
*:*:*:*) ;; # four components is ok
*) # anything else probably means mcstransd is running
- skip_test_ "unexpected context '$ctx'; turn off mcstransd" ;;
+ skip_test_ "unexpected context '$__ctx'; turn off mcstransd" ;;
esac
}
@@ -298,9 +298,9 @@ t_=$("$abs_top_builddir/src/mktemp" -d --tmp="$test_dir_"
cu-$this_test.XXXXXXXX
remove_tmp_()
{
- local st=$?
+ __st=$?
cleanup_
- cd "$test_dir_" && chmod -R u+rwx "$t_" && rm -rf "$t_" && exit $st
+ cd "$test_dir_" && chmod -R u+rwx "$t_" && rm -rf "$t_" && exit $__st
}
# Run each test from within a temporary sub-directory named after the
--
1.6.0.1.285.g1070
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: don't use "local" in bourne shell scripts,
Jim Meyering <=