Skip to content

Commit 53fb274

Browse files
committed
[ReactNative] Use --nonPersistent instead of ignoring node_modules on tests
1 parent a5212c8 commit 53fb274

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

scripts/e2e-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function cleanup {
3131

3232
rm $MARKER
3333
[ $SINOPIA_PID ] && kill -9 $SINOPIA_PID
34+
[ $SERVER_PID ] && kill -9 $SERVER_PID
3435
[ -f ~/.npmrc.bak ] && mv ~/.npmrc.bak ~/.npmrc
3536
}
3637
trap cleanup EXIT
@@ -67,4 +68,6 @@ ls `basename $MARKER` > /dev/null
6768

6869
flow --retries 10
6970

71+
node ./node_modules/react-native/packager/packager.js --nonPersistent &
72+
SERVER_PID=$!
7073
xctool -scheme EndToEndTest -sdk iphonesimulator test

scripts/objc-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ function cleanup {
2020

2121
[ -f $REACT_PACKAGER_LOG ] && cat $REACT_PACKAGER_LOG
2222
fi
23+
[ $SERVER_PID ] && kill -9 $SERVER_PID
2324
}
2425
trap cleanup EXIT
2526

27+
node ./packager/packager.js -- --nonPersistent &
28+
SERVER_PID=$!
2629
xctool \
2730
-project Examples/UIExplorer/UIExplorer.xcodeproj \
2831
-scheme UIExplorer -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5,OS=8.3' \

0 commit comments

Comments
 (0)