Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openj9-systemtest repo options #107

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ inputs:
openj9_repo:
description: 'openj9 Repo'
required: false
openj9-systemtestsRepo:
description: 'Personal openj9-systemtests Repo'
required: false
default: 'openj9-systemtests:master'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value is set up in aqa-tests repo there is no need to redo it in run-aqa. Similar to issue #105

tkg_Repo:
description: 'Personal TKG Repo. For example, octocat/TKG:test'
required: false
Expand All @@ -44,4 +48,4 @@ inputs:
required: false
runs:
using: 'node12'
main: 'dist/index.js'
main: 'dist/index.js'
18 changes: 15 additions & 3 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 aqasystemtestsRepo = core.getInput('aqa-systemtestsRepo', {required: false});
const openj9Repo = core.getInput('openj9_repo', { required: false });
const openj9systemtestsRepo = core.getInput('openj9-systemtestsRepo', { required: false });
const tkgRepo = core.getInput('tkg_Repo', { required: false });
const vendorTestRepos = core.getInput('vendor_testRepos', { required: false });
const vendorTestBranches = core.getInput('vendor_testBranches', {
Expand Down Expand Up @@ -2992,7 +2993,7 @@ function run() {
if (vendorTestShas !== '') {
vendorTestParams += ` --vendor_shas ${vendorTestShas}`;
}
yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo);
yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo,openj9systemtestsRepo);
}
catch (error) {
core.setFailed(error.message);
Expand Down Expand Up @@ -3394,7 +3395,7 @@ if (!tempDirectory) {
}
tempDirectory = path.join(baseLocation, 'actions', 'temp');
}
function runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo) {
function runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, openj9systemtestsRepo) {
return __awaiter(this, void 0, void 0, function* () {
yield installDependencyAndSetup();
setSpec();
Expand All @@ -3413,6 +3414,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')) {
getOpenj9SystemTestsRepo(openj9systemtestsRepo);
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/*.*
Expand Down Expand Up @@ -3572,6 +3574,15 @@ function getAqaSystemTestsRepo(aqasystemtestsRepo) {
process.env.ADOPTOPENJDK_SYSTEMTEST_BRANCH = repoBranch[1];
}

function getOpenj9SystemTestsRepo(openj9systemtestsRepo) {
let repoBranch = ['eclipse-openj9/openj9-systemtest', 'master'];
if (openj9systemtestsRepo.length !== 0) {
repoBranch = parseRepoBranch(openj9systemtestsRepo);
}
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 Expand Up @@ -5048,4 +5059,5 @@ exports.exec = exec;

/***/ })

/******/ });
/******/ });

152 changes: 78 additions & 74 deletions src/aqa.ts
Original file line number Diff line number Diff line change
@@ -1,79 +1,83 @@
import * as core from '@actions/core'
import * as runaqa from './runaqa'

async function run(): Promise<void> {
try {
const jdksource = core.getInput('jdksource', {required: false})
const version = core.getInput('version', {required: false})
const buildList = core.getInput('build_list', {required: false})
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})
const vendorTestBranches = core.getInput('vendor_testBranches', {
required: false
})
const vendorTestDirs = core.getInput('vendor_testDirs', {required: false})
const vendorTestShas = core.getInput('vendor_testShas', {required: false})

let vendorTestParams = ''
// let arch = core.getInput("architecture", { required: false })
if (
jdksource !== 'upstream' &&
jdksource !== 'github-hosted' &&
jdksource !== 'install-jdk'
) {
core.error(
`jdksource should be one of [upstream, github-hosted, install-jdk]. Found: ${jdksource}`
)
}

if (
buildList !== 'openjdk' &&
!buildList.startsWith('external') &&
!buildList.startsWith('functional') &&
!buildList.startsWith('perf') &&
!buildList.startsWith('system')
) {
core.setFailed(
`buildList should be one of or sub dir of [openjdk, external, functional, system, perf]. Found: ${buildList}`
)
}
if (jdksource !== 'upstream' && version.length === 0) {
core.setFailed(
'Please provide jdkversion if jdksource is github-hosted installed or AdoptOpenJKD/install-jdk installed.'
)
}
if (vendorTestRepos !== '') {
vendorTestParams = `--vendor_repos ${vendorTestRepos}`
}
if (vendorTestBranches !== '') {
vendorTestParams += ` --vendor_branches ${vendorTestBranches}`
}
if (vendorTestDirs !== '') {
vendorTestParams += ` --vendor_dirs ${vendorTestDirs}`
}
if (vendorTestShas !== '') {
vendorTestParams += ` --vendor_shas ${vendorTestShas}`
}
await runaqa.runaqaTest(
version,
jdksource,
buildList,
target,
customTarget,
aqatestsRepo,
openj9Repo,
tkgRepo,
vendorTestParams,
aqasystemtestsRepo,
)
} catch (error) {
core.setFailed(error.message)
}
async function run(): Promise<void> {
try {
const jdksource = core.getInput('jdksource', {required: false})
const version = core.getInput('version', {required: false})
const buildList = core.getInput('build_list', {required: false})
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 openj9systemtestsRepo = core.getInput('openj9-systemtestsRepo', { required: false });
const tkgRepo = core.getInput('tkg_Repo', {required: false})
const vendorTestRepos = core.getInput('vendor_testRepos', {required: false})
const vendorTestBranches = core.getInput('vendor_testBranches', {
required: false
})
const vendorTestDirs = core.getInput('vendor_testDirs', {required: false})
const vendorTestShas = core.getInput('vendor_testShas', {required: false})

let vendorTestParams = ''
// let arch = core.getInput("architecture", { required: false })
if (
jdksource !== 'upstream' &&
jdksource !== 'github-hosted' &&
jdksource !== 'install-jdk'
) {
core.error(
`jdksource should be one of [upstream, github-hosted, install-jdk]. Found: ${jdksource}`
)
}

if (
buildList !== 'openjdk' &&
!buildList.startsWith('external') &&
!buildList.startsWith('functional') &&
!buildList.startsWith('perf') &&
!buildList.startsWith('system')
) {
core.setFailed(
`buildList should be one of or sub dir of [openjdk, external, functional, system, perf]. Found: ${buildList}`
)
}
if (jdksource !== 'upstream' && version.length === 0) {
core.setFailed(
'Please provide jdkversion if jdksource is github-hosted installed or AdoptOpenJKD/install-jdk installed.'
)
}
if (vendorTestRepos !== '') {
vendorTestParams = `--vendor_repos ${vendorTestRepos}`
}
if (vendorTestBranches !== '') {
vendorTestParams += ` --vendor_branches ${vendorTestBranches}`
}
if (vendorTestDirs !== '') {
vendorTestParams += ` --vendor_dirs ${vendorTestDirs}`
}
if (vendorTestShas !== '') {
vendorTestParams += ` --vendor_shas ${vendorTestShas}`
}
await runaqa.runaqaTest(
version,
jdksource,
buildList,
target,
customTarget,
aqatestsRepo,
openj9Repo,
tkgRepo,
vendorTestParams,
aqasystemtestsRepo,
openj9systemtestsRepo,
)
} catch (error) {
core.setFailed(error.message)
}
}

run()


Loading