-
Notifications
You must be signed in to change notification settings - Fork 577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve install tests (setting newArchEnabled
and hermesEnabled
correctly on Android)
#5375
Conversation
It turns out the local.properties are not read when building the app.
const localPropertiesContent = | ||
"\n# Install test overwrites below\n\n" + | ||
Object.entries(localProperties) | ||
.map(([k, v]) => `${k}=${v}`) | ||
.join("\n"); | ||
|
||
console.log(`Writing local.properties to ${localPropertiesPath}`); | ||
fs.writeFileSync(localPropertiesPath, localPropertiesContent); | ||
console.log(`Appending gradle properties to ${localPropertiesPath}`); | ||
fs.appendFileSync(localPropertiesPath, localPropertiesContent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes configuring hermes and new architecture on Android.
@@ -18,6 +18,7 @@ defaults: | |||
|
|||
jobs: | |||
install: | |||
name: Install Test on React Native ${{ matrix.platform == 'ios' && 'iOS' || 'Android' }} realm@${{ matrix.realm-version }}, react-native@${{ matrix.react-native-version }} new architecture ${{ matrix.new-architecture && 'enabled' || 'disabled' }} running ${{ matrix.engine }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newArchEnabled
and hermesEnabled
correctly on Android)
// Read the persons out of the database again | ||
const message = | ||
"Persons are " + | ||
realm | ||
.objects("Person") | ||
.map((p) => p.name) | ||
.join(", "); | ||
.join(", ") + | ||
suffix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If i'm understanding this right, this will output a "!" when successful? Is that meaningful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that meaningful?
Not really 🙂 I just need some string to round-trip and expect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! LGTM
What, How & Why?
We had a bug in the way the install tests configured the Android test to run with Hermes disabled.
Also, we now test throwing in code called from C++, because that has historically been (and is currently) broken (because of facebook/react-native#36052).
This also makes it so PRs updating the install test workflow won't post and spam the team channel anymore.