mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 06:46:03 +00:00
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:
parent
19f00e1b4b
commit
0c6000a733
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user