gua-spec: gua spec tests, if needed
This commit is contained in:
37
gua-spec.ts
Normal file
37
gua-spec.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { spawn } from "child_process";
|
||||||
|
import { promisifySpawn } from "cli";
|
||||||
|
import { runcpuOptions } from "commands/spec";
|
||||||
|
import { systemdRunOptions } from "commands/systemd";
|
||||||
|
import { LLVM_INSTALL } from "environment";
|
||||||
|
import path from "path";
|
||||||
|
import { defaultSPEC, renderConfig } from "spec";
|
||||||
|
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
const llvmHash = "31c8e21f40ea654f9d49b3a926acc6ef1f2ca5d5";
|
||||||
|
const llvmPrefix = path.join(LLVM_INSTALL, llvmHash);
|
||||||
|
|
||||||
|
const config = `clang-O2-${llvmHash}.cfg`;
|
||||||
|
|
||||||
|
const spec = defaultSPEC;
|
||||||
|
|
||||||
|
spec.newConfig(config, renderConfig({
|
||||||
|
gccdir: llvmPrefix,
|
||||||
|
optimize: ["-O2", "-msimd"].join(" "),
|
||||||
|
}));
|
||||||
|
|
||||||
|
await promisifySpawn(spawn("systemd-run", [
|
||||||
|
...systemdRunOptions({
|
||||||
|
scope: false,
|
||||||
|
unit: "spec-loadu",
|
||||||
|
user: true,
|
||||||
|
}),
|
||||||
|
"runcpu",
|
||||||
|
...runcpuOptions({
|
||||||
|
benchmarks: ["intspeed"],
|
||||||
|
buildType: "rebuild",
|
||||||
|
config,
|
||||||
|
workload: "ref",
|
||||||
|
})
|
||||||
|
], { env: spec.getEnvironment(), }));
|
||||||
|
})();
|
||||||
Reference in New Issue
Block a user