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';
|
'use strict';
|
||||||
|
|
||||||
function AuthError(problem) {
|
function AuthError(problem) {
|
||||||
var err = Error.apply(undefined, [problem.title]);
|
Error.call(this, problem.title);
|
||||||
Object.assign(err, problem);
|
Object.assign(this, problem);
|
||||||
Object.setPrototypeOf(err, AuthError.prototype);
|
|
||||||
Object.setPrototypeOf(this, err);
|
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthError.prototype = Object.create(Error.prototype, {
|
AuthError.__proto__ = Error;
|
||||||
constructor: { value: AuthError }
|
AuthError.prototype.__proto__ = Error.prototype;
|
||||||
});
|
|
||||||
|
|
||||||
exports['AuthError'] = AuthError;
|
exports['AuthError'] = AuthError;
|
||||||
|
@ -282,8 +282,11 @@ case "$TARGET" in
|
|||||||
xctest ReactExample
|
xctest ReactExample
|
||||||
;;
|
;;
|
||||||
"react-tests-android")
|
"react-tests-android")
|
||||||
# download_server
|
if [ "$(uname)" = 'Darwin' ]; then
|
||||||
# start_server
|
download_server
|
||||||
|
start_server
|
||||||
|
fi
|
||||||
|
|
||||||
[[ $CONFIGURATION == 'Debug' ]] && exit 0
|
[[ $CONFIGURATION == 'Debug' ]] && exit 0
|
||||||
XCPRETTY=''
|
XCPRETTY=''
|
||||||
|
|
||||||
@ -317,7 +320,11 @@ case "$TARGET" in
|
|||||||
echo "********* TESTS COMPLETED *********";
|
echo "********* TESTS COMPLETED *********";
|
||||||
echo "********* File location: $(pwd)/tests.xml *********";
|
echo "********* File location: $(pwd)/tests.xml *********";
|
||||||
cat tests.xml
|
cat tests.xml
|
||||||
# stop_server
|
|
||||||
|
if [ "$(uname)" = 'Darwin' ]; then
|
||||||
|
stop_server
|
||||||
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
"node")
|
"node")
|
||||||
if [ "$(uname)" = 'Darwin' ]; then
|
if [ "$(uname)" = 'Darwin' ]; then
|
||||||
|
@ -22,6 +22,9 @@ adb uninstall io.realm.react.testapp || true
|
|||||||
echo "Reversing port for physical device"
|
echo "Reversing port for physical device"
|
||||||
adb reverse tcp:8081 tcp:8081
|
adb reverse tcp:8081 tcp:8081
|
||||||
|
|
||||||
|
echo "Reversing port for Realm Object Server"
|
||||||
|
adb reverse tcp:9080 tcp:9080
|
||||||
|
|
||||||
echo "Building Release APK"
|
echo "Building Release APK"
|
||||||
pushd android && ./gradlew assembleRelease
|
pushd android && ./gradlew assembleRelease
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user