Skip to content

Commit f09fe3d

Browse files
authored
Dont try to run unit tests with rwc tests again (#19240)
1 parent 2b566b9 commit f09fe3d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/harness/parallel/host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ namespace Harness.Parallel.Host {
137137
let closedWorkers = 0;
138138
for (let i = 0; i < workerCount; i++) {
139139
// TODO: Just send the config over the IPC channel or in the command line arguments
140-
const config: TestConfig = { light: Harness.lightMode, listenForWork: true, runUnitTests: runners.length !== 1 };
140+
const config: TestConfig = { light: Harness.lightMode, listenForWork: true, runUnitTests };
141141
const configPath = ts.combinePaths(taskConfigsFolder, `task-config${i}.json`);
142142
Harness.IO.writeFile(configPath, JSON.stringify(config));
143143
const child = fork(__filename, [`--config="${configPath}"`]);

src/harness/runner.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ let testConfigContent =
8282

8383
let taskConfigsFolder: string;
8484
let workerCount: number;
85-
let runUnitTests = true;
85+
let runUnitTests: boolean | undefined;
8686
let noColors = false;
8787

8888
interface TestConfig {
@@ -108,9 +108,7 @@ function handleTestConfig() {
108108
if (testConfig.light) {
109109
Harness.lightMode = true;
110110
}
111-
if (testConfig.runUnitTests !== undefined) {
112-
runUnitTests = testConfig.runUnitTests;
113-
}
111+
runUnitTests = testConfig.runUnitTests;
114112
if (testConfig.workerCount) {
115113
workerCount = +testConfig.workerCount;
116114
}
@@ -199,6 +197,9 @@ function handleTestConfig() {
199197
runners.push(new FourSlashRunner(FourSlashTestType.Server));
200198
// runners.push(new GeneratedFourslashRunner());
201199
}
200+
if (runUnitTests === undefined) {
201+
runUnitTests = runners.length !== 1; // Don't run unit tests when running only one runner if unit tests were not explicitly asked for
202+
}
202203
}
203204

204205
function beginTests() {

0 commit comments

Comments
 (0)