Enable running android sync tests on macOS (#834)

* start ROS and forward ports when running android tests on macOS

* rework AuthError so JSC likes it
This commit is contained in:
Yavor Georgiev 2017-02-02 02:41:27 +01:00 committed by GitHub
parent 19f00e1b4b
commit 0c6000a733
3 changed files with 17 additions and 11 deletions

View File

@ -19,15 +19,11 @@
'use strict';
function AuthError(problem) {
var err = Error.apply(undefined, [problem.title]);
Object.assign(err, problem);
Object.setPrototypeOf(err, AuthError.prototype);
Object.setPrototypeOf(this, err);
return err;
Error.call(this, problem.title);
Object.assign(this, problem);
}
AuthError.prototype = Object.create(Error.prototype, {
constructor: { value: AuthError }
});
AuthError.__proto__ = Error;
AuthError.prototype.__proto__ = Error.prototype;
exports['AuthError'] = AuthError;

View File

@ -282,8 +282,11 @@ case "$TARGET" in
xctest ReactExample
;;
"react-tests-android")
# download_server
# start_server
if [ "$(uname)" = 'Darwin' ]; then
download_server
start_server
fi
[[ $CONFIGURATION == 'Debug' ]] && exit 0
XCPRETTY=''
@ -317,7 +320,11 @@ case "$TARGET" in
echo "********* TESTS COMPLETED *********";
echo "********* File location: $(pwd)/tests.xml *********";
cat tests.xml
# stop_server
if [ "$(uname)" = 'Darwin' ]; then
stop_server
fi
;;
"node")
if [ "$(uname)" = 'Darwin' ]; then

View File

@ -22,6 +22,9 @@ adb uninstall io.realm.react.testapp || true
echo "Reversing port for physical device"
adb reverse tcp:8081 tcp:8081
echo "Reversing port for Realm Object Server"
adb reverse tcp:9080 tcp:9080
echo "Building Release APK"
pushd android && ./gradlew assembleRelease