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 fatimah akanbi #111

Closed
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
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ The project maintains the following source code repositories

* https://github.com/adoptium/run-aqa

## Contibutor
Akanbi Fatimah

## Eclipse Contributor Agreement

Before your contribution can be accepted by the project team contributors must
Expand Down
14 changes: 12 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ inputs:
build_list: # test category
description:
default: 'openjdk'
target: # test
target: # test
description:
default: '_jdk_math'
build_list: # test category
description:
default: '_jdk_math'
default: 'openstf'
target: #test
description:
default: '_stf_math'

custom_target: # Used if need to set non-default custom target
description:
required: false
Expand All @@ -29,6 +36,9 @@ inputs:
tkg_Repo:
description: 'Personal TKG Repo. For example, octocat/TKG:test'
required: false
stf_Repo:
description: 'stf repo'
required: false
vendor_testRepos:
description: 'Comma-separated list of vendor repositories'
required: false
Expand Down
25 changes: 16 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2957,6 +2957,7 @@ function run() {
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 stfRepo = core.getInput('stf_Repo', { required: false });
const vendorTestRepos = core.getInput('vendor_testRepos', { required: false });
const vendorTestBranches = core.getInput('vendor_testBranches', {
required: false
Expand Down Expand Up @@ -2993,6 +2994,7 @@ function run() {
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,stfRepo, vendorTestParams, aqasystemtestsRepo);
}
catch (error) {
core.setFailed(error.message);
Expand Down Expand Up @@ -3394,13 +3396,13 @@ if (!tempDirectory) {
}
tempDirectory = path.join(baseLocation, 'actions', 'temp');
}
function runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo) {
function runaqaTest(version, stfsource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo,stfRepo, vendorTestParams, aqasystemtestsRepo) {
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);
if (!('TEST_STF_HOME' in process.env))
process.env.TEST_STF_HOME = getTestStfHome(version, stfsource);
yield getAqaTestsRepo(aqatestsRepo);

yield runGetSh(tkgRepo, openj9Repo, vendorTestParams);
Expand Down Expand Up @@ -3428,6 +3430,11 @@ function runaqaTest(version, jdksource, buildList, target, customTarget, aqatest
myOutput += data.toString();
}
};
if (buildList === 'openstf' && stfRepo && stfRepo.length !== 0) {
const repoBranch = parseRepoBranch(stfRepo);
process.env.STF_REPO = repoBranch[0];
process.env.STF_BRANCH = repoBranch[1];
}
process.chdir('TKG');
try {
yield exec.exec('make compile');
Expand All @@ -3450,27 +3457,27 @@ function runaqaTest(version, jdksource, buildList, target, customTarget, aqatest
});
}
exports.runaqaTest = runaqaTest;
function getTestJdkHome(version, jdksource) {
function getTestStfHome(version, stfsource) {
// Try JAVA_HOME first and then fall back to GITHUB actions default location
let javaHome = process.env[`JAVA_HOME_${version}_X64`];
if (javaHome === undefined) {
javaHome = process.env['JAVA_HOME'];
}
if (jdksource === 'install-jdk') {
if (stfsource === 'install-stf') {
// work with AdoptOpenJDK/install-sdk
if (`JDK_${version}` in process.env) {
javaHome = process.env[`JDK_${version}`];
if (`STF_${version}` in process.env) {
javaHome = process.env[`STF_${version}`];
}
else {
javaHome = process.env.JAVA_HOME;
}
}
// Remove spaces in Windows path and replace with a short name path, e.g. 'C:/Program Files/***' ->C:/Progra~1/***
if (IS_WINDOWS && jdksource === 'github-hosted') {
if (IS_WINDOWS && stfsource === 'github-hosted') {
javaHome = javaHome.replace(/Program Files/g, 'Progra~1');
}
if (javaHome === undefined) {
core.error('JDK could not be found');
core.error('STF could not be found');
}
return javaHome;
}
Expand Down
26 changes: 13 additions & 13 deletions src/aqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as runaqa from './runaqa'

async function run(): Promise<void> {
try {
const jdksource = core.getInput('jdksource', {required: false})
const stfSource = core.getInput('stfSource', {required: false})
const version = core.getInput('version', {required: false})
const buildList = core.getInput('build_list', {required: false})
const target = core.getInput('target', {required: false})
Expand All @@ -22,17 +22,17 @@ async function run(): Promise<void> {
let vendorTestParams = ''
// let arch = core.getInput("architecture", { required: false })
if (
jdksource !== 'upstream' &&
jdksource !== 'github-hosted' &&
jdksource !== 'install-jdk'
stfSource !== 'upstream' &&
stfSource !== 'github-hosted' &&
stfSource !== 'install-stf'
) {
core.error(
`jdksource should be one of [upstream, github-hosted, install-jdk]. Found: ${jdksource}`
`stfsource should be one of [upstream, github-hosted, install-jdk]. Found: ${stfSource}`
)
}

if (
buildList !== 'openjdk' &&
buildList !== 'openstf' &&
!buildList.startsWith('external') &&
!buildList.startsWith('functional') &&
!buildList.startsWith('perf') &&
Expand All @@ -42,9 +42,9 @@ async function run(): Promise<void> {
`buildList should be one of or sub dir of [openjdk, external, functional, system, perf]. Found: ${buildList}`
)
}
if (jdksource !== 'upstream' && version.length === 0) {
if (stfSource !== 'upstream' && version.length === 0) {
core.setFailed(
'Please provide jdkversion if jdksource is github-hosted installed or AdoptOpenJKD/install-jdk installed.'
'Please provide stfversion if stfsource is github-hosted installed or AdoptOpenSTF/install-stf installed.'
)
}
if (vendorTestRepos !== '') {
Expand All @@ -61,7 +61,7 @@ async function run(): Promise<void> {
}
await runaqa.runaqaTest(
version,
jdksource,
stfSource,
buildList,
target,
customTarget,
Expand All @@ -71,9 +71,9 @@ async function run(): Promise<void> {
vendorTestParams,
aqasystemtestsRepo,
)
} catch (error) {
core.setFailed(error.message)
}
} catch (error) {
core.setFailed('Please provide stfversion if stfsource is github-hosted installed or AdoptOpenSTF/install-stf installed.')
}
}

run()
run()