kou commented on code in PR #50935:
URL: https://github.com/apache/arrow/pull/50935#discussion_r3848391836
##########
cpp/build-support/run-test.sh:
##########
@@ -23,42 +23,51 @@
# $ARGN - arguments for executable
#
-OUTPUT_ROOT=$1
+OUTPUT_ROOT="$1"
shift
-ROOT=$(cd $(dirname $BASH_SOURCE)/..; pwd)
+ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) || {
+ echo "Failed to determine project root directory" >&2
+ exit 1
+}
Review Comment:
How about this?
```diff
diff --git a/cpp/build-support/run-test.sh b/cpp/build-support/run-test.sh
index 20e225d8dd..b992a21226 100755
--- a/cpp/build-support/run-test.sh
+++ b/cpp/build-support/run-test.sh
@@ -92,8 +92,11 @@ function run_test() {
# even when retries are successful.
rm -f $XMLFILE
- $TEST_EXECUTABLE "$@" > $LOGFILE.raw 2>&1
- STATUS=$?
+ if $TEST_EXECUTABLE "$@" > $LOGFILE.raw 2>&1; then
+ STATUS=0
+ else
+ STATUS=1
+ fi
cat $LOGFILE.raw \
| ${PYTHON:-python} $ROOT/build-support/asan_symbolize.py \
| ${CXXFILT:-c++filt} \
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]