Skip to content

Commit

Permalink
Fix syntax issues that causes tsc build failure
Browse files Browse the repository at this point in the history
Signed-off-by: renfeiw <renfeiw@ca.ibm.com>
  • Loading branch information
renfeiw committed Oct 30, 2021
1 parent 41c5b8a commit 6b3e518
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
18 changes: 7 additions & 11 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2954,7 +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 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 });
Expand Down Expand Up @@ -3402,7 +3402,6 @@ 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');
Expand All @@ -3413,7 +3412,9 @@ 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);
if (aqasystemtestsRepo && aqasystemtestsRepo.length !== 0) {
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.
Expand Down Expand Up @@ -3562,16 +3563,11 @@ 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];
const 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 = '';
Expand Down
6 changes: 4 additions & 2 deletions src/aqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ async function run(): Promise<void> {
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 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})
Expand Down Expand Up @@ -69,7 +71,7 @@ async function run(): Promise<void> {
openj9Repo,
tkgRepo,
vendorTestParams,
aqasystemtestsRepo,
aqasystemtestsRepo
)
} catch (error) {
core.setFailed(error.message)
Expand Down
12 changes: 6 additions & 6 deletions src/runaqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function runaqaTest(
openj9Repo: string,
tkgRepo: string,
vendorTestParams: string,
aqasystemtestsRepo: string,
aqasystemtestsRepo: string
): Promise<void> {
await installDependencyAndSetup()
setSpec()
Expand All @@ -60,8 +60,8 @@ export async function runaqaTest(
)

if (buildList.includes('system')) {
if (aqa-systemtestsRepo && aqa-systemtestsRepo.length !== 0) {
getAqaSystemTestsRepo(aqasystemtestsRepo);
if (aqasystemtestsRepo && aqasystemtestsRepo.length !== 0) {
getAqaSystemTestsRepo(aqasystemtestsRepo)
}
dependents = await tc.downloadTool(
'https://ci.adoptopenjdk.net/view/all/job/systemtest.getDependency/lastSuccessfulBuild/artifact/*zip*/dependents.zip'
Expand Down Expand Up @@ -233,10 +233,10 @@ async function getAqaTestsRepo(aqatestsRepo: string): Promise<void> {
process.chdir('aqa-tests')
}

function getAqaSystemTestsRepo(aqasystemtestsRepo: string) {
function getAqaSystemTestsRepo(aqasystemtestsRepo: string): void {
const repoBranch = parseRepoBranch(aqasystemtestsRepo)
process.env.ADOPTOPENJDK_SYSTEMTEST_REPO = repoBranch[0];
process.env.ADOPTOPENJDK_SYSTEMTEST_BRANCH = repoBranch[1];
process.env.ADOPTOPENJDK_SYSTEMTEST_REPO = repoBranch[0]
process.env.ADOPTOPENJDK_SYSTEMTEST_BRANCH = repoBranch[1]
}

async function runGetSh(
Expand Down

0 comments on commit 6b3e518

Please sign in to comment.