llvm-test-suite: init
This commit is contained in:
27
src/llvm-test-suite.ts
Normal file
27
src/llvm-test-suite.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { spawn } from 'child_process';
|
||||
import * as cmake from 'lyc/commands/cmake';
|
||||
import path from 'path';
|
||||
|
||||
export interface TestSuiteConfigOptions {
|
||||
buildDir: string;
|
||||
testSuiteDir: string;
|
||||
cmakeVariables: Object;
|
||||
optimizeProfile: 'O0' | 'O2' | 'O3' | string;
|
||||
}
|
||||
|
||||
export function configureTestSuite({
|
||||
buildDir,
|
||||
testSuiteDir,
|
||||
cmakeVariables,
|
||||
optimizeProfile,
|
||||
}: TestSuiteConfigOptions) {
|
||||
// Invoke cmake to configure test suite
|
||||
return spawn('cmake', [
|
||||
...cmake.command({
|
||||
pathToSource: testSuiteDir,
|
||||
pathToBuild: buildDir,
|
||||
definitions: cmake.variable(cmakeVariables),
|
||||
preloadCache: path.resolve(testSuiteDir, 'cmake', 'caches', `${optimizeProfile}.cmake`)
|
||||
}),
|
||||
]);
|
||||
}
|
||||
Reference in New Issue
Block a user