Skip to content

Commit 8ee974a

Browse files
authored
Add tools/server for server under ts-node, and update help (#3179)
1 parent c25f9a5 commit 8ee974a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/common/runtime/server.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import sys from './helper/sys.js';
2121

2222
function usage(rc: number): never {
2323
console.log(`Usage:
24-
tools/run_${sys.type} [OPTIONS...]
24+
tools/server [OPTIONS...]
2525
Options:
2626
--colors Enable ANSI colors in output.
2727
--compat Run tests in compatibility mode.
@@ -33,8 +33,10 @@ Options:
3333
--u Flag to set on the gpu-provider as <flag>=<value>
3434
3535
Provides an HTTP server used for running tests via an HTTP RPC interface
36-
To run a test, perform an HTTP GET or POST at the URL:
37-
http://localhost:port/run?<test-name>
36+
First, load some tree or subtree of tests:
37+
http://localhost:port/load?unittests:basic:*
38+
To run a single test case, perform an HTTP GET or POST at the URL:
39+
http://localhost:port/run?unittests:basic:test,sync
3840
To shutdown the server perform an HTTP GET or POST at the URL:
3941
http://localhost:port/terminate
4042
`);

tools/server

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env node
2+
3+
// Launch a server that runs tests server-side on demand.
4+
5+
require('../src/common/tools/setup-ts-in-node.js');
6+
require('../src/common/runtime/server.ts');

0 commit comments

Comments
 (0)