Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cover #32

Merged
merged 5 commits into from
Feb 25, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,20 @@ EOF
$MAKE check-doc-examples || exit 1
;;

"test-cover")
auto_configure || exit 1
$MAKE check-cover-norun || exit 1
TEMP_DIR="$(mktemp -d /tmp/tightdb.objc.check-cover.XXXX)" || exit 1
mkdir -p "$TEMP_DIR/unit-tests-cov.octest/Contents/MacOS" || exit 1
cp "src/tightdb/objc/test/unit-tests-cov" "$TEMP_DIR/unit-tests-cov.octest/Contents/MacOS/" || exit 1
XCODE_HOME="$(xcode-select --print-path)" || exit 1
DYLD_LIBRARY_PATH="$TIGHTDB_OBJC_HOME/src/tightdb/objc" OBJC_DISABLE_GC=YES "$XCODE_HOME/Tools/otest" "$TEMP_DIR/unit-tests-cov.octest" || exit 1
echo "Generating 'gcovr.xml'.."
gcovr -f '.*/tightdb_objc/src/.*' -e '.*/test/.*' -x > gcovr.xml
echo "Test passed."
exit 0
;;

"test-examples")
auto_configure || exit 1
$MAKE test -C "examples" || exit 1
Expand Down Expand Up @@ -579,10 +593,13 @@ EOF
;;

*)
echo "Unspecified or bad mode '$MODE'" 1>&2
echo "Available modes are: config clean build build-iphone test test-debug test-gdb show-install install uninstall test-installed" 1>&2
echo "As well as: install-prod install-devel uninstall-prod uninstall-devel dist-copy" 1>&2
echo "As wall as: ios-framework"
cat << EOF
Unspecified or bad mode '$MODE'.
Available modes are:
config clean build build-iphone test test-debug test-gdb test-cover
show-install install uninstall test-installed install-prod install-devel
uninstall-prod uninstall-devel dist-copy ios-framework
EOF
exit 1
;;

Expand Down