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 <dneto@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
3068dcb3d7
commit
77a7518c95
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue