From 77a7518c959e5cb7b85fec2a30acd7e030a14b9c Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 30 Apr 2021 19:49:39 +0000 Subject: [PATCH] Add fallback when realpath doesn't exist Fixed: tint:763 Change-Id: Id5b687faea82d3e77b8e98607913640fffef6af7 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49620 Auto-Submit: David Neto Commit-Queue: Ben Clayton Kokoro: Kokoro Reviewed-by: Ben Clayton --- test/test-all.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test-all.sh b/test/test-all.sh index 92af86ad14..db98d5bfa6 100755 --- a/test/test-all.sh +++ b/test/test-all.sh @@ -82,7 +82,11 @@ function check() { for TEST_FILE in ${SCRIPT_DIR}/*.spvasm ${SCRIPT_DIR}/*.wgsl do - TEST_FILE=$(realpath --relative-to="$SCRIPT_DIR" "$TEST_FILE") + if [ -x realpath ]; then + TEST_FILE=$(realpath --relative-to="$SCRIPT_DIR" "$TEST_FILE") + else + TEST_FILE=$(echo -n "$TEST_FILE"| sed -e "s'${SCRIPT_DIR}/*''") + fi echo echo "Testing $TEST_FILE..." check "${TEST_FILE}" wgsl