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 all commits
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: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: "run-aqa build with push to master"
on:
push:
<<<<<<< HEAD
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
=======
branches-ignore:
- '**'

>>>>>>> 79a6303 (support custom_target)
jobs:
openjdk: # make sure build/ci work properly
runs-on: ${{ matrix.os }}
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,19 @@ You can also:
| version | 8 |
| build_list | openjdk |
| target | _jdk_math |
<<<<<<< HEAD
<<<<<<< HEAD
| custom_target | |
=======
>>>>>>> 0aaf44c (Update README.md)
=======
| custom_target | |
>>>>>>> 43100af (support custom_target)
| jdksource | upstream |
| aqa-testsRepo | |
| tkg_Repo | |


### version
The Java version that tests are running against (Supported values are: 8, 9, 10, 11, 12, 13, ...)
By default, this action will run against upstream jdk build action installed JDK. Specifying this parameter is required when jdksource is not `upstream`.
Expand Down
15 changes: 14 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ inputs:
target: # test
description:
default: '_jdk_math'
<<<<<<< HEAD
<<<<<<< HEAD
custom_target: # Used if need to set non-default custom target
description:
required: false
Expand All @@ -27,6 +29,9 @@ inputs:
openj9_repo:
description: 'openj9 Repo'
required: false
openj9-systemtestsRepo:
description: 'Personal openj9-systemtests Repo'
required: false
tkg_Repo:
description: 'Personal TKG Repo. For example, octocat/TKG:test'
required: false
Expand All @@ -42,6 +47,14 @@ inputs:
vendor_testShas:
description: 'Comma-separated list of vendor SHAs'
required: false
=======
custom_target:
=======
custom_target: # Used if need to set non-default custom target
>>>>>>> 43100af (support custom_target)
description:
required: false
>>>>>>> 79a6303 (support custom_target)
runs:
using: 'node12'
main: 'dist/index.js'
main: 'dist/index.js'
51 changes: 48 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2953,9 +2953,11 @@ function run() {
const buildList = core.getInput('build_list', { required: false });
const target = core.getInput('target', { required: false });
const customTarget = core.getInput('custom_target', { required: false });
<<<<<<< HEAD
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 All @@ -2964,6 +2966,8 @@ function run() {
const vendorTestDirs = core.getInput('vendor_testDirs', { required: false });
const vendorTestShas = core.getInput('vendor_testShas', { required: false });
let vendorTestParams = '';
=======
>>>>>>> 79a6303 (support custom_target)
// let arch = core.getInput("architecture", { required: false })
if (jdksource !== 'upstream' &&
jdksource !== 'github-hosted' &&
Expand All @@ -2980,6 +2984,7 @@ function run() {
if (jdksource !== 'upstream' && version.length === 0) {
core.setFailed('Please provide jdkversion if jdksource is github-hosted installed or AdoptOpenJKD/install-jdk installed.');
}
<<<<<<< HEAD
if (vendorTestRepos !== '') {
vendorTestParams = `--vendor_repos ${vendorTestRepos}`;
}
Expand All @@ -2992,7 +2997,10 @@ 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);
=======
yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget);
>>>>>>> 79a6303 (support custom_target)
}
catch (error) {
core.setFailed(error.message);
Expand Down Expand Up @@ -3377,6 +3385,7 @@ const core = __importStar(__webpack_require__(470));
const io = __importStar(__webpack_require__(1));
const tc = __importStar(__webpack_require__(533));
const path = __importStar(__webpack_require__(622));
<<<<<<< HEAD
const fs = __importStar(__webpack_require__(747));
let tempDirectory = process.env['RUNNER_TEMP'] || '';
const IS_WINDOWS = process.platform === 'win32';
Expand All @@ -3394,10 +3403,23 @@ 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();
=======
const isWindows = process.platform === 'win32';
function runaqaTest(version, jdksource, buildList, target, customTarget) {
return __awaiter(this, void 0, void 0, function* () {
yield installDependency();
<<<<<<< HEAD
let customOption = '';
if (target.includes('custom') && customTarget !== '') {
customOption = `${target.toUpperCase()}_TARGET=${customTarget}`;
}
>>>>>>> 79a6303 (support custom_target)
=======
>>>>>>> 43100af (support custom_target)
process.env.BUILD_LIST = buildList;
if (!('TEST_JDK_HOME' in process.env))
process.env.TEST_JDK_HOME = getTestJdkHome(version, jdksource);
Expand All @@ -3413,6 +3435,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 All @@ -3431,15 +3454,27 @@ function runaqaTest(version, jdksource, buildList, target, customTarget, aqatest
process.chdir('TKG');
try {
yield exec.exec('make compile');
<<<<<<< HEAD
<<<<<<< HEAD
if (target.includes('custom') && customTarget !== '') {
const customOption = `${target
.substr(1)
.toUpperCase()}_TARGET=${customTarget}`;
=======
if (target.includes('custom') && customTarget !== '') {
const customOption = `${target.substr(1).toUpperCase()}_TARGET=${customTarget}`;
>>>>>>> 43100af (support custom_target)
yield exec.exec('make', [`${target}`, `${customOption}`], options);
}
else {
yield exec.exec('make', [`${target}`], options);
}
<<<<<<< HEAD
=======
yield exec.exec('make', [`${target} ${customOption}`], options);
>>>>>>> 79a6303 (support custom_target)
=======
>>>>>>> 43100af (support custom_target)
}
catch (error) {
core.setFailed(error.message);
Expand Down Expand Up @@ -3572,6 +3607,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 +5092,5 @@ exports.exec = exec;

/***/ })

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

11 changes: 11 additions & 0 deletions src/aqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ async function run(): Promise<void> {
const version = core.getInput('version', {required: false})
const buildList = core.getInput('build_list', {required: false})
const target = core.getInput('target', {required: false})
<<<<<<< HEAD
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', {
Expand All @@ -20,6 +22,9 @@ async function run(): Promise<void> {
const vendorTestShas = core.getInput('vendor_testShas', {required: false})

let vendorTestParams = ''
=======
const customTarget = core.getInput('custom_target',{required: false})
>>>>>>> 79a6303 (support custom_target)
// let arch = core.getInput("architecture", { required: false })
if (
jdksource !== 'upstream' &&
Expand Down Expand Up @@ -47,6 +52,7 @@ async function run(): Promise<void> {
'Please provide jdkversion if jdksource is github-hosted installed or AdoptOpenJKD/install-jdk installed.'
)
}
<<<<<<< HEAD
if (vendorTestRepos !== '') {
vendorTestParams = `--vendor_repos ${vendorTestRepos}`
}
Expand All @@ -70,7 +76,12 @@ async function run(): Promise<void> {
tkgRepo,
vendorTestParams,
aqasystemtestsRepo,
openj9systemtestsRepo,
)
=======

await runaqa.runaqaTest(version, jdksource, buildList, target, customTarget)
>>>>>>> 79a6303 (support custom_target)
} catch (error) {
core.setFailed(error.message)
}
Expand Down
35 changes: 35 additions & 0 deletions src/runaqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,29 @@ export async function runaqaTest(
jdksource: string,
buildList: string,
target: string,
<<<<<<< HEAD
customTarget: string,
aqatestsRepo: string,
openj9Repo: string,
tkgRepo: string,
vendorTestParams: string,
aqasystemtestsRepo: string,
openj9systemtestsRepo: string,
): Promise<void> {
await installDependencyAndSetup()
setSpec()
=======
customTarget: string
): Promise<void> {
await installDependency()
<<<<<<< HEAD
let customOption = ''
if (target.includes('custom') && customTarget !== '') {
customOption = `${target.toUpperCase()}_TARGET=${customTarget}`
}
>>>>>>> 79a6303 (support custom_target)
=======
>>>>>>> 43100af (support custom_target)
process.env.BUILD_LIST = buildList
if (!('TEST_JDK_HOME' in process.env))
process.env.TEST_JDK_HOME = getTestJdkHome(version, jdksource)
Expand All @@ -61,6 +75,7 @@ export async function runaqaTest(

if (buildList.includes('system')) {
getAqaSystemTestsRepo(aqasystemtestsRepo);
getOpenj9SystemTestsRepo(openj9systemtestsRepo);
dependents = await tc.downloadTool(
'https://ci.adoptopenjdk.net/view/all/job/systemtest.getDependency/lastSuccessfulBuild/artifact/*zip*/dependents.zip'
)
Expand All @@ -87,14 +102,26 @@ export async function runaqaTest(
process.chdir('TKG')
try {
await exec.exec('make compile')
<<<<<<< HEAD
<<<<<<< HEAD
if (target.includes('custom') && customTarget !== '') {
const customOption = `${target
.substr(1)
.toUpperCase()}_TARGET=${customTarget}`
=======
if (target.includes('custom') && customTarget !== '') {
const customOption = `${target.substr(1).toUpperCase()}_TARGET=${customTarget}`
>>>>>>> 43100af (support custom_target)
await exec.exec('make', [`${target}`, `${customOption}`], options)
} else {
await exec.exec('make', [`${target}`], options)
}
<<<<<<< HEAD
=======
await exec.exec('make', [`${target} ${customOption}`], options)
>>>>>>> 79a6303 (support custom_target)
=======
>>>>>>> 43100af (support custom_target)
} catch (error) {
core.setFailed(error.message)
}
Expand Down Expand Up @@ -231,6 +258,14 @@ async function getAqaTestsRepo(aqatestsRepo: string): Promise<void> {
process.chdir('aqa-tests')
}

function getOpenj9SystemTestsRepo(openj9systemtestsRepo: string){
let repoBranch=['eclipse-openj9/openj9-systemtest','master'];
if(openj9systemtestsRepo.length!==0){
repoBranch=parseRepoBranch(openj9systemtestsRepo);
}
process.env.OPENJ9_SYSTEMTEST_REPO = repoBranch[0];
process.env.OPENJ9_SYSTEMTEST_BRANCH = repoBranch[1];
}
function getAqaSystemTestsRepo(aqasystemtestsRepo: string) {
let repoBranch = ['adoptium/aqa-systemtests', 'master']
if (aqasystemtestsRepo.length !== 0) {
Expand Down