From 6bc5e25b37f997b42faccade956f8415b8bae207 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 10 Jan 2025 07:42:49 -0800 Subject: [PATCH] Fix test-e2e-local with RNTester due to unbuilt codegen (#48558) Summary: Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c ` currently fails if you start from RNTester Android. That's because codegen is not built. This commit fixes it. Changelog: [Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen Reviewed By: cipolleschi Differential Revision: D67972074 --- scripts/release-testing/test-e2e-local.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/release-testing/test-e2e-local.js b/scripts/release-testing/test-e2e-local.js index 34661737815ab7..fcb23721ee4a9d 100644 --- a/scripts/release-testing/test-e2e-local.js +++ b/scripts/release-testing/test-e2e-local.js @@ -138,6 +138,12 @@ async function testRNTesterAndroid( } version of RNTester Android with the new Architecture enabled`, ); + // Build Codegen as we're on a empty environment and metro needs it. + // This can be removed once we have codegen hooked in the `yarn build` step. + exec( + '../../gradlew :packages:react-native:ReactAndroid:buildCodegenCLI --quiet', + ); + // Start the Metro server so it will be ready if the app can be built and installed successfully. launchPackagerInSeparateWindow(pwd().toString());