convert relative cargo path to absolute one. Otherwise binaries can't be found
# TODO: abort if connector argument is missing
set -e
export CONNECTOR_TO_TEST=$1
-export PRISMA_BINARY_PATH=${CARGO_TARGET_DIR}/release/prisma
-export MIGRATION_ENGINE_BINARY_PATH=${CARGO_TARGET_DIR}/release/migration-engine
+ABSOLUTE_CARGO_TARGET_DIR=`realpath $CARGO_TARGET_DIR`
+export PRISMA_BINARY_PATH=${ABSOLUTE_CARGO_TARGET_DIR}/release/prisma
+export MIGRATION_ENGINE_BINARY_PATH=${ABSOLUTE_CARGO_TARGET_DIR}/release/migration-engine
echo "Will run tests against connector $CONNECTOR_TO_TEST"
echo $CONNECTOR_TO_TEST > connector_to_test
