forked from vilterp/datalog-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathallTests.ts
61 lines (57 loc) · 2.12 KB
/
allTests.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { runSuites, Suite } from "./util/testBench/testing";
import { unifyTests } from "./core/unifyTests";
import {
coreTestsSimple,
coreTestsIncremental,
coreTestsCommon,
parserTests,
joinOrderTests,
} from "./core/ddTests";
import { prettyPrintTests } from "./core/prettyTest";
import { treeTests } from "./util/treeTest";
import { parserlibTests } from "./languageWorkbench/parserlib/ddTests";
import { incrTests } from "./core/incremental/ddTests";
import { sourcePositionsTests } from "./languageWorkbench/sourcePositionsTest";
import { executionVisualizerTests } from "./apps/executionVisualizer/ddTests";
import { kvSyncTests } from "./apps/actors/systems/kvSync/ddTests";
import { nativeTests } from "./languageWorkbench/languages/dl/nativeTests";
import { lwbTests } from "./languageWorkbench/ddTests";
import { optTests } from "./core/opt/optTests";
import { dl2Tests } from "./languageWorkbench/languages/dl2/compiler/ddTests";
// TODO: use a real arg parser
const flags = new Set(process.argv.slice(2));
const writeResults = flags.has("--write-results");
const stayAlive = flags.has("--stay-alive");
const suites: { [name: string]: Suite } = {
unifyTests,
parserTests: parserTests(writeResults),
// TODO: it does seem kind of bad to have two test suites that use the same set of dd files
coreTestsSimple: coreTestsSimple(writeResults),
coreTestsIncremental: coreTestsIncremental(writeResults),
coreTestsCommon: coreTestsCommon(writeResults),
joinOrderTests: joinOrderTests(writeResults),
incrTests: incrTests(writeResults),
prettyPrintTests,
treeTests,
parserlibTests: parserlibTests(writeResults),
sourcePositionsTests,
kvSync: kvSyncTests(writeResults),
executionVisualizer: executionVisualizerTests(writeResults),
dl2Tests: dl2Tests(writeResults),
lwbTests: lwbTests(writeResults),
lwbNativeDatalogTests: nativeTests,
optTests: optTests(writeResults),
};
try {
runSuites(suites);
} catch (e) {
console.error(e.message);
if (!stayAlive) {
console.log("exiting");
process.exit(1);
}
}
if (stayAlive) {
console.log("keeping VM alive for inspector...");
setInterval(() => {}, 100);
}