Skip to content

Commit

Permalink
fixes #92 enable jdkRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
bhuva-v committed Oct 1, 2021
1 parent 1a5c2c3 commit 511939d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ inputs:
description: 'testing jdk version (Required when jdksource is github-hosted or install-jdk.)'
required: false
build_list: # test category
description:
description:
default: 'openjdk'
target: # test
description:
description:
default: '_jdk_math'
custom_target: # Used if need to set non-default custom target
description:
Expand All @@ -26,6 +26,9 @@ inputs:
tkg_Repo:
description: 'Personal TKG Repo. For example, octocat/TKG:test'
required: false
jdk_Repo:
description: 'jdk Repo'
required: false
vendor_testRepos:
description: 'Comma-separated list of vendor repositories'
required: false
Expand Down
10 changes: 8 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2956,6 +2956,7 @@ function run() {
const aqatestsRepo = core.getInput('aqa-testsRepo', { required: false });
const openj9Repo = core.getInput('openj9_repo', { required: false });
const tkgRepo = core.getInput('tkg_Repo', { required: false });
const jdkRepo = core.getInput('jdk_Repo', { required: false });
const vendorTestRepos = core.getInput('vendor_testRepos', { required: false });
const vendorTestBranches = core.getInput('vendor_testBranches', {
required: false
Expand Down Expand Up @@ -2991,7 +2992,7 @@ function run() {
if (vendorTestShas !== '') {
vendorTestParams += ` --vendor_shas ${vendorTestShas}`;
}
yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams);
yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, jdkRepo, vendorTestParams);
}
catch (error) {
core.setFailed(error.message);
Expand Down Expand Up @@ -3393,7 +3394,7 @@ if (!tempDirectory) {
}
tempDirectory = path.join(baseLocation, 'actions', 'temp');
}
function runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams) {
function runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, jdkRepo, vendorTestParams) {
return __awaiter(this, void 0, void 0, function* () {
yield installDependencyAndSetup();
setSpec();
Expand Down Expand Up @@ -3425,6 +3426,11 @@ function runaqaTest(version, jdksource, buildList, target, customTarget, aqatest
myOutput += data.toString();
}
};
if (buildList === 'openjdk' && jdkRepo && jdkRepo.length !== 0) {
const repoBranch = parseRepoBranch(jdkRepo);
process.env.JDK_REPO = repoBranch[0];
process.env.JDK_BRANCH = repoBranch[1];
}
process.chdir('TKG');
try {
yield exec.exec('make compile');
Expand Down
2 changes: 2 additions & 0 deletions src/aqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async function run(): Promise<void> {
const aqatestsRepo = core.getInput('aqa-testsRepo', {required: false})
const openj9Repo = core.getInput('openj9_repo', {required: false})
const tkgRepo = core.getInput('tkg_Repo', {required: false})
const jdkRepo = core.getInput('jdk_Repo', {required: false})
const vendorTestRepos = core.getInput('vendor_testRepos', {required: false})
const vendorTestBranches = core.getInput('vendor_testBranches', {
required: false
Expand Down Expand Up @@ -67,6 +68,7 @@ async function run(): Promise<void> {
aqatestsRepo,
openj9Repo,
tkgRepo,
jdkRepo,
vendorTestParams
)
} catch (error) {
Expand Down
8 changes: 8 additions & 0 deletions src/runaqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export async function runaqaTest(
aqatestsRepo: string,
openj9Repo: string,
tkgRepo: string,
jdkRepo: string,
vendorTestParams: string
): Promise<void> {
await installDependencyAndSetup()
Expand Down Expand Up @@ -82,6 +83,13 @@ export async function runaqaTest(
myOutput += data.toString()
}
}

if (buildList === 'openjdk' && jdkRepo && jdkRepo.length !== 0) {
const repoBranch = parseRepoBranch(jdkRepo)
process.env.JDK_REPO = repoBranch[0]
process.env.JDK_BRANCH = repoBranch[1]
}

process.chdir('TKG')
try {
await exec.exec('make compile')
Expand Down

0 comments on commit 511939d

Please sign in to comment.