Files
MapLibreParticleLab/platform/osx/scripts/test.sh
Minh Nguyễn ceb0790cd8 [osx] Unit tests
Added an XCTest bundle to the osxsdk scheme. It contains some basic tests of shared iOS/OS X code.
2015-12-24 14:41:23 -08:00

29 lines
708 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -o pipefail
set -u
OSX_SDK_VERSION=`xcrun --sdk macosx --show-sdk-version`
OSX_PROJ_PATH=./build/osx-x86_64/gyp/osx.xcodeproj
export BUILDTYPE=${BUILDTYPE:-Release}
if [[ ! -e "${OSX_PROJ_PATH}/xcshareddata/xcschemes/osxsdk.xcscheme" ]]; then
# Generate schemes
open -g "${OSX_PROJ_PATH}"
sleep 20
# Share osxsdk scheme
mkdir -pv "${OSX_PROJ_PATH}/xcshareddata/xcschemes/"
mv -v \
"${OSX_PROJ_PATH}/xcuserdata/${USER}.xcuserdatad/xcschemes/osxsdk.xcscheme" \
"${OSX_PROJ_PATH}/xcshareddata/xcschemes/"
fi
xcodebuild -verbose \
-sdk macosx${OSX_SDK_VERSION} \
-project "${OSX_PROJ_PATH}" \
-scheme osxsdk \
test