commands/spec: add outputRoot(--output_root) option

This commit is contained in:
2024-06-20 17:25:00 +08:00
parent b830b9922f
commit 0919128391

View File

@@ -57,6 +57,14 @@ export interface RunCPUOptions {
* Meaning: Attempt to create all processes in a single group. Improves the chances that ^C will get the whole run, not just one of the children.
*/
setprocgroup?: boolean;
/**
* If set to a non-empty value, all output files will be rooted under the named directory, instead of under $SPEC (or %SPEC%).
* If directory is not an absolute path (one that begins with "/" on Unix, or a device name on Windows), the path will be created under $SPEC.
*
* This option can be useful for sharing an installation.
*/
outputRoot?: string;
}
export function runcpuOptions(o: RunCPUOptions): string[] {
@@ -76,5 +84,6 @@ export function runcpuOptions(o: RunCPUOptions): string[] {
...undefList(o.benchmarks, bench => bench),
...undefList(o.outputFormat, of => ["--output_format", of.join(",")]),
...optSwitch("--setprocgroup", o.setprocgroup),
...optFlag("--output_root", o.outputRoot),
];
}