Repository: realm/realm-swift
File: build.sh (Shell)

Code before:
        path_list_prepend DYLD_LIBRARY_PATH "$REALM_OBJC_HOME/src/realm/objc" || exit 1
        export DYLD_LIBRARY_PATH
        OBJC_DISABLE_GC=YES
        gdb --args "$XCODE_HOME/usr/bin/xctest" -XCTest All "$TEMP_DIR/unit-tests-dbg.xctest"
        ;;

    "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.xctest/Contents/MacOS" || exit 1
        cp "src/realm/objc/test/unit-tests-cov" "$TEMP_DIR/unit-tests-cov.xctest/Contents/MacOS/" || exit 1
        XCODE_HOME="$(xcode-select --print-path)" || exit 1
        path_list_prepend DYLD_LIBRARY_PATH="$REALM_OBJC_HOME/src/realm/objc" || exit 1
        export DYLD_LIBRARY_PATH
        OBJC_DISABLE_GC=YES
        "$XCODE_HOME/usr/bin/xctest" -XCTest All "$TEMP_DIR/unit-tests-cov.xctest" || exit 1
        echo "Generating 'gcovr.xml'.."
        gcovr -f '.*/tightdb_objc/src/.*' -e '.*/test/.*' -x > gcovr.xml
        echo "Test passed."
        exit 0
        ;;

    "check-doc-examples")
        auto_configure || exit 1
        $MAKE check-doc-examples || exit 1
        ;;

    "test-examples")
        auto_configure || exit 1
        $MAKE test -C "examples" || exit 1
        ;;

    "install-report")
        has_installed=0
        install_libdir="$(get_config_param "INSTALL_LIBDIR")"
        find $install_libdir -name '*tightdb*' | while read f; do
            has_installed=1
            echo "  $f"
        done
        exit $has_installed
        ;;

    "show-install")
        temp_dir="$(mktemp -d /tmp/tightdb.objc.show-install.XXXX)" || exit 1
        mkdir "$temp_dir/fake-root" || exit 1
        DESTDIR="$temp_dir/fake-root" sh build.sh install >/dev/null || exit 1
        (cd "$temp_dir/fake-root" && find * \! -type d >"$temp_dir/list") || exit 1
        sed 's|^|/|' <"$temp_dir/list" || exit 1
        rm -fr "$temp_dir/fake-root" || exit 1
        rm "$temp_dir/list" || exit 1

Review comment (suggestion):
I know this is merged already but this message has a typo + unclear wording. Consider saying “You should run `sh build.sh ios-framework` to generate it"


Code after:

    "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.xctest/Contents/MacOS" || exit 1
        cp "src/realm/objc/test/unit-tests-cov" "$TEMP_DIR/unit-tests-cov.xctest/Contents/MacOS/" || exit 1
        XCODE_HOME="$(xcode-select --print-path)" || exit 1
        path_list_prepend DYLD_LIBRARY_PATH="$REALM_OBJC_HOME/src/realm/objc" || exit 1
        export DYLD_LIBRARY_PATH
        OBJC_DISABLE_GC=YES
        "$XCODE_HOME/usr/bin/xctest" -XCTest All "$TEMP_DIR/unit-tests-cov.xctest" || exit 1
        echo "Generating 'gcovr.xml'.."
        gcovr -f '.*/tightdb_objc/src/.*' -e '.*/test/.*' -x > gcovr.xml
        echo "Test passed."
        exit 0
        ;;

    "check-doc-examples")
        auto_configure || exit 1
        $MAKE check-doc-examples || exit 1
        ;;

    "test-examples")
        if [ ! -e "Realm.framework" ]; then
            echo "No Realm.framework found. You run the ios-framework target to generate it."
            exit 0
        fi
        (
            cd examples
            for example_name in $(ls -l | grep "^d" | awk '{ print $9 }'); do
                xctool -project "$example_name"/"$example_name".xcodeproj -scheme "$example_name" clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
            done
        ) || exit 1
        ;;

    "install-report")
        has_installed=0
        install_libdir="$(get_config_param "INSTALL_LIBDIR")"
        find $install_libdir -name '*tightdb*' | while read f; do
            has_installed=1
            echo "  $f"
        done
        exit $has_installed
        ;;

    "show-install")
        temp_dir="$(mktemp -d /tmp/tightdb.objc.show-install.XXXX)" || exit 1
        mkdir "$temp_dir/fake-root" || exit 1
        DESTDIR="$temp_dir/fake-root" sh build.sh install >/dev/null || exit 1
        (cd "$temp_dir/fake-root" && find * \! -type d >"$temp_dir/list") || exit 1