From d417788b24e515fa040169eed7687a8e129ce1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Fri, 15 Nov 2024 03:00:17 -0800 Subject: [PATCH] Hook up RN integration tests in Jest pipeline at Meta (#47613) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47613 Changelog: [internal] Reviewed By: sammy-SC Differential Revision: D65661703 fbshipit-source-id: 269444f8f7124082f06ffcf89cec40992a107d67 --- jest/integration/runner/runner.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jest/integration/runner/runner.js b/jest/integration/runner/runner.js index 8aa346379ce..8a49822b872 100644 --- a/jest/integration/runner/runner.js +++ b/jest/integration/runner/runner.js @@ -127,6 +127,10 @@ module.exports = async function runTest( ]; const rnTesterCommandResult = spawnSync('buck2', rnTesterCommandArgs, { encoding: 'utf8', + env: { + ...process.env, + PATH: `/usr/local/bin:${process.env.PATH ?? ''}`, + }, }); if (rnTesterCommandResult.status !== 0) { @@ -138,6 +142,8 @@ module.exports = async function runTest( rnTesterCommandResult.stdout, 'stderr:', rnTesterCommandResult.stderr, + 'error:', + rnTesterCommandResult.error, ].join('\n'), ); } @@ -156,7 +162,9 @@ module.exports = async function runTest( const endTime = Date.now(); - console.log(rnTesterParsedOutput.logs); + if (process.env.SANDCASTLE == null) { + console.log(rnTesterParsedOutput.logs); + } const testResults = nullthrows(rnTesterParsedOutput.testResult.testResults).map(testResult => ({