Repository navigation
Expand file tree
/
Copy pathide_test.mjs
More file actions
48 lines (41 loc) · 2.02 KB
/
Copy pathide_test.mjs
File metadata and controls
48 lines (41 loc) · 2.02 KB
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
#!/usr/bin/env node
// Run the IDE scenarios: every lane listed in test/ide/lanes.mjs, each a
// node:test file run in a process of its own, with its own private desktop (from
// tbbroker), work folder and copy of the twinBASIC install. These operate the IDE
// itself (the debugger, Export Project, the Packages dialog); add-ins are
// addin_test.mjs's.
//
// node scripts/ide_test.mjs [options]
//
// The options, the exit codes and how a run works are in scripts/lib/lane-runner.mjs,
// which addin_test.mjs shares; ide-test.bat is the wrapper. Not a gate.
import path from "node:path";
import { exitOnCrash } from "../lib/cli.mjs";
import { REPO_ROOT } from "../lib/repo-paths.mjs";
import { runLanes } from "./lib/lane-runner.mjs";
exitOnCrash();
const USAGE = `usage: node scripts/ide_test.mjs [--only REGEX] [--jobs N] [--timeout S] [--ide <twinBASIC.exe>] [--show|--hide] [-h, --help]
Runs the IDE scenarios: every lane in test/ide/lanes.mjs, each in a process of
its own with its own IDE copy, private desktop and work folder.
--only <regex> only the lanes whose name matches
--jobs <n> lanes at once (default 2)
--timeout <secs> a lane still running after this long is ended (default 600)
--ide <path> the twinBASIC.exe to copy (default: $TB_IDE, else the
newest twinBASIC_IDE_BETA_* on the Desktop)
--show, --hide as tbbuild's
-h, --help print this text and exit
Exit codes:
0 every lane passed, and the registry is as it was found
1 a lane failed, or the run was interrupted
2 the harness could not run: a refused command line, no IDE, no matching lane, a
registry it could not record, or a crash after which the registry was put back
3 the registry or a work folder was not put back, at the end of a run or after a
crash, or the IDE's recent list or remembered build targets name a lane's
folder; see the lines above`;
await runLanes({
tool: "ide-test",
suite: path.join(REPO_ROOT, "test", "ide"),
workDir: "tbide",
usage: USAGE,
subject: "IDE",
});