Skip to content

Commit

Permalink
fixes adoptium#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 512df5a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 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
13 changes: 9 additions & 4 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,15 +3394,15 @@ 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();
process.env.BUILD_LIST = buildList;
if (!('TEST_JDK_HOME' in process.env))
process.env.TEST_JDK_HOME = getTestJdkHome(version, jdksource);
yield getAqaTestsRepo(aqatestsRepo);
yield runGetSh(tkgRepo, openj9Repo, vendorTestParams);
yield runGetSh(tkgRepo, jdkRepo, openj9Repo, vendorTestParams);
//Get Dependencies, using /*zip*/dependents.zip to avoid loop every available files
let dependents = yield tc.downloadTool('https://ci.adoptopenjdk.net/view/all/job/test.getDependency/lastSuccessfulBuild/artifact//*zip*/dependents.zip');
let sevenzexe = '7z';
Expand Down Expand Up @@ -3559,13 +3560,17 @@ function getAqaTestsRepo(aqatestsRepo) {
process.chdir('aqa-tests');
});
}
function runGetSh(tkgRepo, openj9Repo, vendorTestParams) {
function runGetSh(tkgRepo, openj9Repo, jdkRepo, vendorTestParams) {
return __awaiter(this, void 0, void 0, function* () {
let parameters = '';
if (tkgRepo.length !== 0) {
const repoBranch = parseRepoBranch(tkgRepo);
parameters += `--tkg_branch ${repoBranch[1]} --tkg_repo https://github.com/${repoBranch[0]}.git`;
}
if (jdkRepo && jdkRepo.length !== 0) {
const repoBranch = parseRepoBranch(jdkRepo);
parameters += ` --jdk_branch ${repoBranch[1]} --jdk_repo https://github.com/${repoBranch[0]}.git`;
}
if (openj9Repo.length !== 0) {
const repoBranch = parseRepoBranch(openj9Repo);
parameters += ` --openj9_branch ${repoBranch[1]} --openj9_repo https://github.com/${repoBranch[0]}.git`;
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: 7 additions & 1 deletion 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 All @@ -41,7 +42,7 @@ export async function runaqaTest(
process.env.TEST_JDK_HOME = getTestJdkHome(version, jdksource)

await getAqaTestsRepo(aqatestsRepo)
await runGetSh(tkgRepo, openj9Repo, vendorTestParams)
await runGetSh(tkgRepo, jdkRepo, openj9Repo, vendorTestParams)

//Get Dependencies, using /*zip*/dependents.zip to avoid loop every available files
let dependents = await tc.downloadTool(
Expand Down Expand Up @@ -232,13 +233,18 @@ async function getAqaTestsRepo(aqatestsRepo: string): Promise<void> {
async function runGetSh(
tkgRepo: string,
openj9Repo: string,
jdkRepo: string,
vendorTestParams: string
): Promise<void> {
let parameters = ''
if (tkgRepo.length !== 0) {
const repoBranch = parseRepoBranch(tkgRepo)
parameters += `--tkg_branch ${repoBranch[1]} --tkg_repo https://github.com/${repoBranch[0]}.git`
}
if (jdkRepo && jdkRepo.length !== 0) {
const repoBranch = parseRepoBranch(jdkRepo);
parameters += ` --jdk_branch ${repoBranch[1]} --jdk_repo https://github.com/${repoBranch[0]}.git`;
}
if (openj9Repo.length !== 0) {
const repoBranch = parseRepoBranch(openj9Repo)
parameters += ` --openj9_branch ${repoBranch[1]} --openj9_repo https://github.com/${repoBranch[0]}.git`
Expand Down

0 comments on commit 512df5a

Please sign in to comment.