mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Move CI validation for debugCpp and profileCpp to EnvironmentOptions (#56464)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56464 Changelog: [internal] Moved the CI validation checks for `debugCpp` and `profileCpp` from the `run()` function in `tester.js` to `validateEnvironmentVariables()` in `EnvironmentOptions.js`, alongside the existing CI/OSS validation for memory instrumentation. This centralizes all environment option validation in one place, so invalid configurations are caught early during environment setup rather than at tester execution time. Reviewed By: javache Differential Revision: D101159820 fbshipit-source-id: 1e488db6e9de3eb3bac840c4931bb1536f8b5efb
This commit is contained in:
1 parent
d1a8a1f2a6
commit
def621f674
2 files changed
+8
-8
No files matched your search
@@ -107,6 +107,14 @@ export function validateEnvironmentVariables(): void {
|
||||
}
|
||||
}
|
||||
|
||||
if (isCI && debugCpp) {
|
||||
throw new Error('Cannot run Fantom with C++ debugging on CI');
|
||||
}
|
||||
|
||||
if (isCI && profileCpp) {
|
||||
throw new Error('Cannot run Fantom with C++ profiling on CI');
|
||||
}
|
||||
|
||||
// Enabling memory instrumentation is only necessary when taking JS heap
|
||||
// snapshots in optimized builds (where it is disabled by default).
|
||||
// This isn't supported in CI or in OSS because that would require adding
|
||||
|
||||
@@ -125,14 +125,6 @@ export function run(
|
||||
options: TesterOptions,
|
||||
env: EnvironmentOverrides,
|
||||
): AsyncCommandResult {
|
||||
if (isCI && debugCpp) {
|
||||
throw new Error('Cannot run Fantom with C++ debugging on CI');
|
||||
}
|
||||
|
||||
if (isCI && profileCpp) {
|
||||
throw new Error('Cannot run Fantom with C++ profiling on CI');
|
||||
}
|
||||
|
||||
if (!isCI && !debugCpp) {
|
||||
build(options, env);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user