Skip to content

Remove old test262 and dt runner infra #53125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ node_modules/
.node_modules/
built/*
tests/cases/rwc/*
tests/cases/test262/*
tests/cases/perf/*
!tests/cases/webharness/compilerToString.js
test-args.txt
Expand All @@ -14,7 +13,6 @@ tests/baselines/local.old/*
tests/services/baselines/local/*
tests/baselines/prototyping/local/*
tests/baselines/rwc/*
tests/baselines/test262/*
tests/baselines/reference/projectOutput/*
tests/baselines/local/projectOutput/*
tests/baselines/reference/testresults.tap
Expand Down
1 change: 0 additions & 1 deletion scripts/build/tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const localBaseline = "tests/baselines/local/";
export const refBaseline = "tests/baselines/reference/";
export const localRwcBaseline = "internal/baselines/rwc/local";
export const refRwcBaseline = "internal/baselines/rwc/reference";
export const localTest262Baseline = "internal/baselines/test262/local";

/**
* @param {string} runJs
Expand Down
2 changes: 1 addition & 1 deletion src/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../.eslintrc.json",
"parserOptions": {
"tsconfigRootDir": "src",
"project": "./tsconfig-base.json"
"project": "./tsconfig-eslint.json"
},
"rules": {
"@typescript-eslint/no-unnecessary-type-assertion": "error",
Expand Down
9 changes: 2 additions & 7 deletions src/harness/harnessIO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ export namespace Compiler {
// if lib.d.ts is explicitly included in input files and there are some errors in it (i.e. because of duplicate identifiers)
// then they will be added twice thus triggering 'total errors' assertion with condition
// Similarly for tsconfig, which may be in the input files and contain errors.
// 'totalErrorsReportedInNonLibraryNonTsconfigFiles + numLibraryDiagnostics + numTsconfigDiagnostics + numTest262HarnessDiagnostics, diagnostics.length
// 'totalErrorsReportedInNonLibraryNonTsconfigFiles + numLibraryDiagnostics + numTsconfigDiagnostics, diagnostics.length

if (!error.file || !isDefaultLibraryFile(error.file.fileName) && !vpath.isTsConfigFile(error.file.fileName)) {
totalErrorsReportedInNonLibraryNonTsconfigFiles++;
Expand Down Expand Up @@ -719,13 +719,8 @@ export namespace Compiler {
return !!diagnostic.file && (vpath.isTsConfigFile(diagnostic.file.fileName));
});

const numTest262HarnessDiagnostics = ts.countWhere(diagnostics, diagnostic => {
// Count an error generated from tests262-harness folder.This should only apply for test262
return !!diagnostic.file && diagnostic.file.fileName.indexOf("test262-harness") >= 0;
});

// Verify we didn't miss any errors in total
assert.equal(totalErrorsReportedInNonLibraryNonTsconfigFiles + numLibraryDiagnostics + numTsconfigDiagnostics + numTest262HarnessDiagnostics, diagnostics.length, "total number of errors");
assert.equal(totalErrorsReportedInNonLibraryNonTsconfigFiles + numLibraryDiagnostics + numTsconfigDiagnostics, diagnostics.length, "total number of errors");
}

export function doErrorBaseline(baselinePath: string, inputFiles: readonly TestFile[], errors: readonly ts.Diagnostic[], pretty?: boolean) {
Expand Down
2 changes: 1 addition & 1 deletion src/harness/runnerbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "./_namespaces/Harness";
import * as ts from "./_namespaces/ts";

export type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "rwc" | "test262" | "dt";
export type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "rwc";
export type CompilerTestKind = "conformance" | "compiler";
export type FourslashTestKind = "fourslash" | "fourslash-shims" | "fourslash-shims-pp" | "fourslash-server";

Expand Down
2 changes: 0 additions & 2 deletions src/testRunner/_namespaces/Harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export { Parallel };

export * from "../fourslashRunner";
export * from "../compilerRunner";
export * from "../externalCompileRunner";
export * from "../test262Runner";
export * from "../runner";

// If running as emitted CJS, don't start executing the tests here; instead start in runner.ts.
Expand Down
4 changes: 0 additions & 4 deletions src/testRunner/compilerRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import * as vpath from "./_namespaces/vpath";
export const enum CompilerTestType {
Conformance,
Regressions,
Test262
}

interface CompilerFileBasedTest extends FileBasedTest {
Expand All @@ -41,9 +40,6 @@ export class CompilerBaselineRunner extends RunnerBase {
else if (testType === CompilerTestType.Regressions) {
this.testSuiteName = "compiler";
}
else if (testType === CompilerTestType.Test262) {
this.testSuiteName = "test262";
}
else {
this.testSuiteName = "compiler"; // default to this for historical reasons
}
Expand Down
132 changes: 0 additions & 132 deletions src/testRunner/externalCompileRunner.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/testRunner/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as FourSlash from "./_namespaces/FourSlash";
import {
CompilerBaselineRunner,
CompilerTestType,
DefinitelyTypedRunner,
FourSlashRunner,
GeneratedFourslashRunner,
IO,
Expand All @@ -11,7 +10,6 @@ import {
setLightMode,
setShardId,
setShards,
Test262BaselineRunner,
TestRunnerKind,
} from "./_namespaces/Harness";
import * as project from "./_namespaces/project";
Expand Down Expand Up @@ -76,10 +74,6 @@ export function createRunner(kind: TestRunnerKind): RunnerBase {
return new project.ProjectRunner();
case "rwc":
return new RWC.RWCRunner();
case "test262":
return new Test262BaselineRunner();
case "dt":
return new DefinitelyTypedRunner();
}
return ts.Debug.fail(`Unknown runner kind ${kind}`);
}
Expand Down Expand Up @@ -214,12 +208,6 @@ function handleTestConfig() {
case "rwc":
runners.push(new RWC.RWCRunner());
break;
case "test262":
runners.push(new Test262BaselineRunner());
break;
case "dt":
runners.push(new DefinitelyTypedRunner());
break;
}
}
}
Expand Down
120 changes: 0 additions & 120 deletions src/testRunner/test262Runner.ts

This file was deleted.

6 changes: 6 additions & 0 deletions src/tsconfig-eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig-base",
"compilerOptions": {
"types": ["node", "mocha", "chai"]
}
}
Loading