Skip to content

Commit

Permalink
update parameter to prebuildContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
sophia-guo committed Jan 20, 2025
1 parent 3cd07b9 commit 5ca521f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
26 changes: 13 additions & 13 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function run() {
const vendorTestShas = core.getInput('vendor_testShas', { required: false });
const runParallel = core.getInput('run_parallel', { required: false });
const numMachines = core.getInput('num_machines', { required: false });
let envReady = core.getInput('envReady', { required: false });
let prebuildContainer = core.getInput('prebuildContainer', { required: false });
let vendorTestParams = '';
// let arch = core.getInput("architecture", { required: false })
if (jdksource !== 'upstream' &&
Expand Down Expand Up @@ -113,14 +113,14 @@ function run() {
if (sdkdir === '') {
sdkdir = process.cwd();
}
if (envReady === '') {
envReady = 'false';
if (prebuildContainer === '') {
prebuildContainer = 'false';
}
if (runParallel === 'true' && numMachines != '1') {
yield runaqa.setupParallelEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, numMachines, envReady);
yield runaqa.setupParallelEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, numMachines, prebuildContainer);
}
else {
yield runaqa.runaqaTest(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, envReady);
yield runaqa.runaqaTest(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, prebuildContainer);
}
}
catch (error) {
Expand Down Expand Up @@ -225,12 +225,12 @@ if (!tempDirectory) {
* @param {[string]} tkgRepo Alternative TKG repo
* @param {[string]} vendorTestParams Vendor provided test parameters
* @param {[string]} aqasystemtestsRepo Alternative AQA-systemtestRepo
* @param {[boolean]} evnReady if environment need to update
* @param {[string]} prebuildContainer if environment need to update
* @return {[null]} null
*/
function runaqaTest(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, isTestContainer) {
function runaqaTest(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, prebuildContainer) {
return __awaiter(this, void 0, void 0, function* () {
yield setupTestEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, isTestContainer);
yield setupTestEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, prebuildContainer);
const options = {};
let myOutput = '';
options.listeners = {
Expand Down Expand Up @@ -506,12 +506,12 @@ function runGetSh(tkgRepo, openj9Repo, vendorTestParams, jdksource, customizedSd
* @param {[string]} tkgRepo Alternative TKG repo
* @param {[string]} vendorTestParams Vendor provided test parameters
* @param {[string]} aqasystemtestsRepo Alternative AQA-systemtestRepo
* @param {[boolean]} evnReady if environment need to update
* @param {[string]} prebuildContainer if environment need to update
* @return {[null]} null
*/
function setupParallelEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, numMachines, isTestContainer) {
function setupParallelEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, numMachines, prebuildContainer) {
return __awaiter(this, void 0, void 0, function* () {
yield setupTestEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, isTestContainer);
yield setupTestEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, prebuildContainer);
process.chdir('TKG');
process.env.PARALLEL_OPTIONS = `PARALLEL_OPTIONS=TEST=${target} TEST_TIME= NUM_MACHINES=${numMachines}`;
yield exec.exec(`make genParallelList ${process.env.PARALLEL_OPTIONS}`);
Expand Down Expand Up @@ -552,9 +552,9 @@ function setupEnvVariables(version, jdksource, buildList, sdkdir) {
* @param {[string]} aqasystemtestsRepo Alternative AQA-systemtestRepo
* @return {null} null
*/
function setupTestEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, isTestContainer) {
function setupTestEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, prebuildContainer) {
return __awaiter(this, void 0, void 0, function* () {
if (isTestContainer == "false") {
if (prebuildContainer == "false") {
yield installPlatformDependencies();
}
setupEnvVariables(version, jdksource, buildList, sdkdir);
Expand Down
10 changes: 5 additions & 5 deletions src/aqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function run(): Promise<void> {
const vendorTestShas = core.getInput('vendor_testShas', {required: false})
const runParallel = core.getInput('run_parallel', {required: false})
const numMachines = core.getInput('num_machines', {required: false})
let envReady = core.getInput('envReady', {required: false})
let prebuildContainer = core.getInput('prebuildContainer', {required: false})
let vendorTestParams = ''
// let arch = core.getInput("architecture", { required: false })
if (
Expand Down Expand Up @@ -75,8 +75,8 @@ async function run(): Promise<void> {
if (sdkdir === '') {
sdkdir = process.cwd()
}
if (envReady === '') {
envReady = 'false'
if (prebuildContainer === '') {
prebuildContainer = 'false'
}
if(runParallel === 'true' && numMachines != '1') {

Expand All @@ -93,7 +93,7 @@ async function run(): Promise<void> {
vendorTestParams,
aqasystemtestsRepo,
numMachines,
envReady
prebuildContainer
)
}
else {
Expand All @@ -110,7 +110,7 @@ async function run(): Promise<void> {
tkgRepo,
vendorTestParams,
aqasystemtestsRepo,
envReady
prebuildContainer
)
}
} catch (error) {
Expand Down
16 changes: 8 additions & 8 deletions src/runaqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (!tempDirectory) {
* @param {[string]} tkgRepo Alternative TKG repo
* @param {[string]} vendorTestParams Vendor provided test parameters
* @param {[string]} aqasystemtestsRepo Alternative AQA-systemtestRepo
* @param {[boolean]} evnReady if environment need to update
* @param {[string]} prebuildContainer if environment need to update
* @return {[null]} null
*/
export async function runaqaTest(
Expand All @@ -54,7 +54,7 @@ export async function runaqaTest(
tkgRepo: string,
vendorTestParams: string,
aqasystemtestsRepo: string,
isTestContainer: string
prebuildContainer: string
): Promise<void> {

await setupTestEnv(
Expand All @@ -69,7 +69,7 @@ export async function runaqaTest(
tkgRepo,
vendorTestParams,
aqasystemtestsRepo,
isTestContainer
prebuildContainer
);

const options: ExecOptions = {}
Expand Down Expand Up @@ -368,7 +368,7 @@ async function runGetSh(
* @param {[string]} tkgRepo Alternative TKG repo
* @param {[string]} vendorTestParams Vendor provided test parameters
* @param {[string]} aqasystemtestsRepo Alternative AQA-systemtestRepo
* @param {[boolean]} evnReady if environment need to update
* @param {[string]} prebuildContainer if environment need to update
* @return {[null]} null
*/
export async function setupParallelEnv(
Expand All @@ -384,10 +384,10 @@ export async function setupParallelEnv(
vendorTestParams: string,
aqasystemtestsRepo: string,
numMachines: string,
isTestContainer: string
prebuildContainer: string
): Promise<void> {

await setupTestEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, isTestContainer);
await setupTestEnv(version, jdksource, customizedSdkUrl, sdkdir, buildList, target, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, prebuildContainer);
process.chdir('TKG');
process.env.PARALLEL_OPTIONS = `PARALLEL_OPTIONS=TEST=${target} TEST_TIME= NUM_MACHINES=${numMachines}`;
await exec.exec(`make genParallelList ${process.env.PARALLEL_OPTIONS}`);
Expand Down Expand Up @@ -442,9 +442,9 @@ async function setupTestEnv(
tkgRepo: string,
vendorTestParams: string,
aqasystemtestsRepo: string,
isTestContainer: string
prebuildContainer: string
): Promise<void> {
if (isTestContainer == "false") {
if (prebuildContainer == "false") {
await installPlatformDependencies();
}
setupEnvVariables(version, jdksource, buildList, sdkdir);
Expand Down

0 comments on commit 5ca521f

Please sign in to comment.