From d5a590a7ad9e229e015e97b6005f2303f8e43a7f Mon Sep 17 00:00:00 2001 From: Dale Henrichs Date: Sun, 11 Feb 2024 11:07:54 -0800 Subject: [PATCH] bigger tweak to test --- another Darwin exception --- tests/test_defaultRegistry.sh | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/tests/test_defaultRegistry.sh b/tests/test_defaultRegistry.sh index a2f9a8dd..63ed8876 100755 --- a/tests/test_defaultRegistry.sh +++ b/tests/test_defaultRegistry.sh @@ -166,18 +166,34 @@ if [ "$template" = "minimal_rowan" ] ; then --projectsHome=$GSDEVKIT_STONES_ROOT/.. $* fi +onDarwin="false" +PLATFORM="`uname -sm | tr ' ' '-'`" +case "$PLATFORM" in + Darwin-arm64 | Darwin-x86_64) + onDarwin="true" + ;; + *) + echo "This script should only be run on Mac (Darwin-i386 or Darwin-arm64), or Linux (Linux-x86_64) ). The result from \"uname -sm\" is \"`uname -sm`\"" + exit 1 + ;; +esac + # test regitstryQuery.solo -queryResult=`registryQuery.solo -r $defaultRegistryName --stonesDirectory` -queryResult=`realpath $queryResult` -expectedResult=`realpath $STONES_HOME/test_stones/stones` -echo "stonesDirectory QUERY=$queryResult" -if [ "$queryResult" != "$expectedResult" ]; then - echo "stonesDirectory query ($queryResult) does not equal expected result ($expectedResult)" - exit 1 -fi queryResult=`registryQuery.solo --GsDevKit_stones_root` echo "GsDevKit_stones_root QUERY=$queryResult" +queryResult=`registryQuery.solo -r $defaultRegistryName --stonesDirectory` +echo "stonesDirectory QUERY=$queryResult" +if [ "$onDarwin" = "false" ]; then + # realpath does not exist on Darwin, so don't bother validating the query result + queryResult=`realpath $queryResult` + expectedResult=`realpath $STONES_HOME/test_stones/stones` + echo "stonesDirectory QUERY=$queryResult" + if [ "$queryResult" != "$expectedResult" ]; then + echo "stonesDirectory query ($queryResult) does not equal expected result ($expectedResult)" + exit 1 + fi +fi # delete the stone cd $STONES_HOME deleteStone.solo $stoneName $*