summaryrefslogtreecommitdiff
path: root/utils/bugpoint
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2009-07-18 18:39:24 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2009-07-18 18:39:24 +0000
commitfc2271f3f5cf25a739f625ba7dfc6d618d26db7b (patch)
tree9ed23c1add75cdcb63d8c77b98d2f70d9b9f9296 /utils/bugpoint
parentb1f61e24d168c2ea8ab374d9f0b5524f66ed1e04 (diff)
downloadllvm-fc2271f3f5cf25a739f625ba7dfc6d618d26db7b.tar.gz
llvm-fc2271f3f5cf25a739f625ba7dfc6d618d26db7b.tar.bz2
llvm-fc2271f3f5cf25a739f625ba7dfc6d618d26db7b.tar.xz
Require a remote command to exit with the exit status of the test program or with 255 if an error occurred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/bugpoint')
-rw-r--r--utils/bugpoint/RemoteRunSafely.sh21
1 files changed, 9 insertions, 12 deletions
diff --git a/utils/bugpoint/RemoteRunSafely.sh b/utils/bugpoint/RemoteRunSafely.sh
index 543a22554e..f390e339ea 100644
--- a/utils/bugpoint/RemoteRunSafely.sh
+++ b/utils/bugpoint/RemoteRunSafely.sh
@@ -2,11 +2,9 @@
#
# Program: RemoteRunSafely.sh
#
-# Synopsis: This script simply runs another program remotely using rsh.
-# It always returns the another program exit code.
-#
-# (?) only exit statuses that indicates that the program could not be executed
-# normally is considered to indicate a test failure.
+# Synopsis: This script simply runs another program remotely using ssh.
+# It always returns the another program exit code or exit with
+# code 255 which indicates that the program could not be executed.
#
# Syntax:
#
@@ -25,8 +23,8 @@ printUsageAndExit()
{
echo "Usage:"
echo "./RemoteRunSafely.sh <hostname> [-l <login_name>] [-p <port>] " \
- "[cd <working_dir>] <program> <args...>"
- exit 1
+ "<program> <args...>"
+ exit 255
}
moreArgsExpected()
@@ -88,7 +86,7 @@ fi
local_program=$WORKING_DIR"/"$PROGRAM
if [ ! -x "$local_program" ]; then
echo "File "$local_program" does not exist or is not an executable.."
- exit 2
+ exit 255
fi
connection=$RUSER'@'$RHOST
@@ -98,11 +96,10 @@ remote="./"$PROGRAM
$RCLIENT $connection $RPORT \
'rm -f '$remote' ; ' \
'cat > '$remote' ; chmod +x '$remote' ; '$remote' '$*' ; ' \
- 'echo exit $? ; ' \
- 'rm -f '$remote
+ 'err=$? ; rm -f '$remote' ; exit $err'
)
+err=$?
-#DEBUG: err=$?
#DEBUG: echo script exit $err
-#DEBUG: exit $err
+exit $err