diff --git a/action.yml b/action.yml index 60d5537..0ae5ead 100644 --- a/action.yml +++ b/action.yml @@ -20,6 +20,10 @@ inputs: aqa-testsRepo: description: 'Personal aqa-tests Repo. For example, octocat/aqa-tests:test' required: false + aqa-systemtestsRepo: + description: 'Personal aqa-systemtests Repo. For example, octocat/aqa-systemtests:test' + required: false + default: 'aqa-systemtest:master' openj9_repo: description: 'openj9 Repo' required: false diff --git a/dist/index.js b/dist/index.js index d753ac7..1c92eba 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2954,6 +2954,7 @@ function run() { const target = core.getInput('target', { required: false }); const customTarget = core.getInput('custom_target', { required: false }); const aqatestsRepo = core.getInput('aqa-testsRepo', { required: false }); + const aqasystemtestsRepo = core.getInput('aqa-systemtestsRepo', {required: false}); const openj9Repo = core.getInput('openj9_repo', { required: false }); const tkgRepo = core.getInput('tkg_Repo', { required: false }); const vendorTestRepos = core.getInput('vendor_testRepos', { required: false }); @@ -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, vendorTestParams, aqasystemtestsRepo); } catch (error) { core.setFailed(error.message); @@ -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, vendorTestParams, aqasystemtestsRepo) { return __awaiter(this, void 0, void 0, function* () { yield installDependencyAndSetup(); setSpec(); @@ -3401,6 +3402,7 @@ function runaqaTest(version, jdksource, buildList, target, customTarget, aqatest if (!('TEST_JDK_HOME' in process.env)) process.env.TEST_JDK_HOME = getTestJdkHome(version, jdksource); yield getAqaTestsRepo(aqatestsRepo); + yield runGetSh(tkgRepo, 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'); @@ -3411,6 +3413,7 @@ function runaqaTest(version, jdksource, buildList, target, customTarget, aqatest // Test.dependency only has one level of archive directory, none of actions toolkit support mv files by regex. Using 7zip discards the directory directly yield exec.exec(`${sevenzexe} e ${dependents} -o${process.env.GITHUB_WORKSPACE}/aqa-tests/TKG/lib`); if (buildList.includes('system')) { + getAqaSystemTestsRepo(aqasystemtestsRepo); dependents = yield tc.downloadTool('https://ci.adoptopenjdk.net/view/all/job/systemtest.getDependency/lastSuccessfulBuild/artifact/*zip*/dependents.zip'); // System.dependency has different levels of archive structures archive/systemtest_prereqs/*.* // None of io.mv, io.cp and exec.exec can mv directories as expected (mv archive/ ./). Move subfolder systemtest_prereqs instead. @@ -3559,6 +3562,16 @@ function getAqaTestsRepo(aqatestsRepo) { process.chdir('aqa-tests'); }); } + +function getAqaSystemTestsRepo(aqasystemtestsRepo) { + let repoBranch = ['adoptium/aqa-systemtests', 'master']; + if (aqasystemtestsRepo.length !== 0) { + repoBranch = parseRepoBranch(aqasystemtestsRepo); + } + process.env.ADOPTOPENJDK_SYSTEMTEST_REPO = repoBranch[0]; + process.env.ADOPTOPENJDK_SYSTEMTEST_BRANCH = repoBranch[1]; +} + function runGetSh(tkgRepo, openj9Repo, vendorTestParams) { return __awaiter(this, void 0, void 0, function* () { let parameters = ''; diff --git a/src/aqa.ts b/src/aqa.ts index 2d19d66..8c005de 100644 --- a/src/aqa.ts +++ b/src/aqa.ts @@ -9,6 +9,7 @@ async function run(): Promise { const target = core.getInput('target', {required: false}) const customTarget = core.getInput('custom_target', {required: false}) const aqatestsRepo = core.getInput('aqa-testsRepo', {required: false}) + const aqasystemtestsRepo = core.getInput('aqa-systemtestsRepo', {required: false}) const openj9Repo = core.getInput('openj9_repo', {required: false}) const tkgRepo = core.getInput('tkg_Repo', {required: false}) const vendorTestRepos = core.getInput('vendor_testRepos', {required: false}) @@ -67,7 +68,8 @@ async function run(): Promise { aqatestsRepo, openj9Repo, tkgRepo, - vendorTestParams + vendorTestParams, + aqasystemtestsRepo, ) } catch (error) { core.setFailed(error.message) diff --git a/src/runaqa.ts b/src/runaqa.ts index c02b21f..9e9483e 100644 --- a/src/runaqa.ts +++ b/src/runaqa.ts @@ -32,7 +32,8 @@ export async function runaqaTest( aqatestsRepo: string, openj9Repo: string, tkgRepo: string, - vendorTestParams: string + vendorTestParams: string, + aqasystemtestsRepo: string, ): Promise { await installDependencyAndSetup() setSpec() @@ -59,6 +60,7 @@ export async function runaqaTest( ) if (buildList.includes('system')) { + getAqaSystemTestsRepo(aqasystemtestsRepo); dependents = await tc.downloadTool( 'https://ci.adoptopenjdk.net/view/all/job/systemtest.getDependency/lastSuccessfulBuild/artifact/*zip*/dependents.zip' ) @@ -229,6 +231,15 @@ async function getAqaTestsRepo(aqatestsRepo: string): Promise { process.chdir('aqa-tests') } +function getAqaSystemTestsRepo(aqasystemtestsRepo: string) { + let repoBranch = ['adoptium/aqa-systemtests', 'master'] + if (aqasystemtestsRepo.length !== 0) { + repoBranch = parseRepoBranch(aqasystemtestsRepo) + } + process.env.ADOPTOPENJDK_SYSTEMTEST_REPO = repoBranch[0]; + process.env.ADOPTOPENJDK_SYSTEMTEST_BRANCH = repoBranch[1]; +} + async function runGetSh( tkgRepo: string, openj9Repo: string,