Skip to content

Commit 5067899

Browse files
committed
fix hermes param handling in test-e2e-local.js (#48068)
Summary: why: running `yarn test-e2e-local -t "RNTestProject" -p "Android" -h false -c $GITHUB_TOKEN` would actually build the app with Hermes even though it's specified as disabled. This is because of the `if (argv.hermes == null)` condition whose body would not execute. The condition was changed [recently](f322dc7#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffR258). Reason for `await` being used: ``` Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ scripts/release-testing/test-e2e-local.js:303:32 Cannot get argv.hermes because property hermes is missing in Promise [1]. [prop-missing] scripts/release-testing/test-e2e-local.js 300│ 'reactNativeArchitectures=arm64-v8a', 301│ 'android/gradle.properties', 302│ ); 303│ const hermesEnabled = (argv).hermes === true; 304│ 305│ // Update gradle properties to set Hermes as false 306│ if (!hermesEnabled) { flow-typed/npm/yargs_v17.x.x.js [1] 80│ argv: Argv | Promise<Argv>; ``` ## Changelog: [INTERNAL] [FIXED] - fix `hermes` param handling in `test-e2e-local.js`
1 parent 0ed16b4 commit 5067899

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/release-testing/test-e2e-local.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,10 @@ async function testRNTestProject(
300300
'reactNativeArchitectures=arm64-v8a',
301301
'android/gradle.properties',
302302
);
303+
const hermesEnabled = (await argv).hermes === true;
303304

304305
// Update gradle properties to set Hermes as false
305-
if (argv.hermes == null) {
306+
if (!hermesEnabled) {
306307
sed(
307308
'-i',
308309
'hermesEnabled=true',
@@ -317,7 +318,7 @@ async function testRNTestProject(
317318
exec('bundle install');
318319
exec(
319320
`HERMES_ENGINE_TARBALL_PATH=${hermesPath} USE_HERMES=${
320-
argv.hermes === true ? 1 : 0
321+
hermesEnabled ? 1 : 0
321322
} bundle exec pod install --ansi`,
322323
);
323324

0 commit comments

Comments
 (0)