commands/spec: add output_format

This commit is contained in:
2024-06-18 02:01:09 +08:00
parent ec905e8ec8
commit b0730a8945

View File

@@ -17,6 +17,38 @@ interface SPECOptions {
benchmarks?: string[]
buildType?: "nobuild" | "rebuild" | "plain",
/**
* Default: HTML and text
* Meaning: Desired report format.
* An output format may be deselected by prepending any of the names with the word "no".
* If more than one option is used, separate them by commas or colons.
* The values are not case-sensitive.
*/
outputFormat?: ("all"
/** config file used for this run, written as a numbered file in the result directory, for example */
| "config"
/** Reportable syntax check */
| "check"
/**
* Comma-separated variable.
* If you populate spreadsheets from your runs,
* you probably should not cut/paste data from text files;
* you'll get more accurate data by using --output_format csv.
* The csv report includes all runs, more decimal places,
* system information, and even the compiler flags.
*/
| "csv"
| "default"
| "flags"
| "html"
| "mail"
| "pdf"
| "postscript"
| "raw"
| "screen"
/** Plain ASCII text file */
| "text")[];
}
export function runcpuOptions(o: SPECOptions): string[] {
@@ -33,6 +65,7 @@ export function runcpuOptions(o: SPECOptions): string[] {
return []
}
}),
...undefList(o.benchmarks, bench => bench)
...undefList(o.benchmarks, bench => bench),
...undefList(o.outputFormat, of => ["--output_format", of.join(",")]),
]
}