Remove static_hermes_staging variant for Fantom tests (#52861)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52861

Changelog: [internal]

We added this mode recently to support all local Hermes variants, but this doubles the number of build type combinations which regresses test execution time and give us little benefit, so we're removing it.

Reviewed By: rshest

Differential Revision: D79080370

fbshipit-source-id: e1b536427acb98ec01edfd44829e2fef9be9b18d
This commit is contained in:
Rubén Norte
2025-07-28 06:35:49 -07:00
committed by Facebook GitHub Bot
parent 20fc2618d0
commit 082db1e0a7
4 changed files with 3 additions and 31 deletions
@@ -35,8 +35,6 @@ function formatFantomHermesVariant(hermesVariant: HermesVariant): string {
return 'hermes';
case FantomTestConfigHermesVariant.StaticHermesStable:
return 'shermes 🆕';
case FantomTestConfigHermesVariant.StaticHermesStaging:
return 'shermes ⏭️';
case FantomTestConfigHermesVariant.StaticHermesExperimental:
return 'shermes 🧪';
}
+2 -6
View File
@@ -142,8 +142,8 @@ export function getOverrides(
* - `fantom_mode`: specifies the level of optimization to compile the test
* with. Valid values are `dev`, `dev-bytecode` and `opt`.
* - `fantom_hermes_variant`: specifies the Hermes variant to use to run the
* test. Valid values are `hermes`, `static_hermes_stable`,
* `static_hermes_staging` and `static_hermes_experimental`.
* test. Valid values are `hermes`, `static_hermes_stable` and
* `static_hermes_experimental`.
* - `fantom_flags`: specifies the configuration for common and JS-only feature
* flags. They can be specified in the same pragma or in different ones, and
* the format is `<flag_name>:<value>`.
@@ -233,9 +233,6 @@ export default function getFantomTestConfigs(
case 'static_hermes_stable':
config.hermesVariant = HermesVariant.StaticHermesStable;
break;
case 'static_hermes_staging':
config.hermesVariant = HermesVariant.StaticHermesStaging;
break;
case 'static_hermes_experimental':
config.hermesVariant = HermesVariant.StaticHermesExperimental;
break;
@@ -243,7 +240,6 @@ export default function getFantomTestConfigs(
configVariations.push([
{hermesVariant: HermesVariant.Hermes},
{hermesVariant: HermesVariant.StaticHermesStable},
{hermesVariant: HermesVariant.StaticHermesStaging},
{hermesVariant: HermesVariant.StaticHermesExperimental},
]);
break;
+1 -5
View File
@@ -20,7 +20,7 @@ const BUCK_ISOLATION_DIR = 'react-native-fantom-buck-out';
export enum HermesVariant {
Hermes,
StaticHermesStable, // Static Hermes Stable
StaticHermesStaging, // Static Hermes Staging
// This creates too many combinations and it's not worth the cost for now.
StaticHermesExperimental, // Static Hermes Trunk
}
@@ -32,8 +32,6 @@ export function getBuckOptionsForHermes(
return [];
case HermesVariant.StaticHermesStable:
return ['-c hermes.static_hermes=stable'];
case HermesVariant.StaticHermesStaging:
return ['-c hermes.static_hermes=staging'];
case HermesVariant.StaticHermesExperimental:
return ['-c hermes.static_hermes=trunk'];
}
@@ -45,8 +43,6 @@ export function getHermesCompilerTarget(variant: HermesVariant): string {
return '//xplat/hermes/tools/hermesc:hermesc';
case HermesVariant.StaticHermesStable:
return '//xplat/shermes/stable:hermesc';
case HermesVariant.StaticHermesStaging:
return '//xplat/shermes/staging:hermesc';
case HermesVariant.StaticHermesExperimental:
return '//xplat/static_h:hermesc';
}
@@ -1,18 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
* @fantom_hermes_variant static_hermes_staging
*/
declare var HermesInternal: $HermesInternalType;
describe('"@fantom_hermes_variant static_hermes_staging" in docblock', () => {
it('should use Static Hermes', () => {
expect(HermesInternal.getRuntimeProperties?.()['Static Hermes']).toBe(true);
});
});