Skip to content

Commit def621f

Browse files
rubennortemeta-codesync[bot]
authored andcommitted
Move CI validation for debugCpp and profileCpp to EnvironmentOptions (#56464)
Summary: Pull Request resolved: #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
1 parent d1a8a1f commit def621f

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

private/react-native-fantom/runner/EnvironmentOptions.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ export function validateEnvironmentVariables(): void {
107107
}
108108
}
109109

110+
if (isCI && debugCpp) {
111+
throw new Error('Cannot run Fantom with C++ debugging on CI');
112+
}
113+
114+
if (isCI && profileCpp) {
115+
throw new Error('Cannot run Fantom with C++ profiling on CI');
116+
}
117+
110118
// Enabling memory instrumentation is only necessary when taking JS heap
111119
// snapshots in optimized builds (where it is disabled by default).
112120
// This isn't supported in CI or in OSS because that would require adding

private/react-native-fantom/runner/executables/tester.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,6 @@ export function run(
125125
options: TesterOptions,
126126
env: EnvironmentOverrides,
127127
): AsyncCommandResult {
128-
if (isCI && debugCpp) {
129-
throw new Error('Cannot run Fantom with C++ debugging on CI');
130-
}
131-
132-
if (isCI && profileCpp) {
133-
throw new Error('Cannot run Fantom with C++ profiling on CI');
134-
}
135-
136128
if (!isCI && !debugCpp) {
137129
build(options, env);
138130
}

0 commit comments

Comments
 (0)