diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8eb5755..4ab75ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,8 @@ name: "build-test" on: # rebuild any PRs and main branch changes push: - branches: - - feature + branches-ignore: + - '**' jobs: build: # make sure build/ci work properly @@ -21,6 +21,6 @@ jobs: uses: ./ with: version: '11' - jdksource: 'customized' + jdksource: 'install-jdk' build_list: 'functional' target: '_floatSanityTests' diff --git a/.gitignore b/.gitignore index 18e337d..4aafce2 100644 --- a/.gitignore +++ b/.gitignore @@ -96,4 +96,7 @@ Thumbs.db # Ignore built ts files __tests__/runner/* -lib/**/* \ No newline at end of file +lib/**/* + +# Ignore Eclipse project +.project \ No newline at end of file diff --git a/README.md b/README.md index 4cc8f40..74c7115 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,10 @@ You can also: | version | 8 | | build_list | openjdk | | target | _jdk_math | +| custom_target | | | jdksource | upstream | + ### 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`. @@ -103,6 +105,9 @@ Test category. The values are openjdk, functional, system, perf, external. ### target Specific testcase name or different test level under build_list +### custom_target +Set customized testcase when any custom target is selected(e.g. jdk_custom, langtools_custom, etc) , path to the test class to execute + ### jdksource THe source of test against JDK. Default is `upstream`. Supported value is [`upstream`, `install-jdk`, `github-hosted`] - upstream: JDK built by buildjdk action diff --git a/action.yml b/action.yml index 478b3a9..f74fcb3 100644 --- a/action.yml +++ b/action.yml @@ -13,7 +13,10 @@ inputs: default: 'openjdk' target: # test description: - default: '_jdk_custom' + default: '_jdk_math' + custom_target: # Used if need to set non-default custom target + description: + required: false runs: using: 'node12' main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index 39565b4..ac2010d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2890,6 +2890,7 @@ function run() { 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 }); // let arch = core.getInput("architecture", { required: false }) if (jdksource !== 'upstream' && jdksource !== 'github-hosted' && @@ -2906,7 +2907,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.'); } - yield runaqa.runaqaTest(version, jdksource, buildList, target); + yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget); } catch (error) { core.setFailed(error.message); @@ -3237,7 +3238,7 @@ const io = __importStar(__webpack_require__(1)); const tc = __importStar(__webpack_require__(533)); const path = __importStar(__webpack_require__(622)); const isWindows = process.platform === 'win32'; -function runaqaTest(version, jdksource, buildList, target) { +function runaqaTest(version, jdksource, buildList, target, customTarget) { return __awaiter(this, void 0, void 0, function* () { yield installDependency(); process.env.BUILD_LIST = buildList; @@ -3260,7 +3261,13 @@ function runaqaTest(version, jdksource, buildList, target) { process.chdir('TKG'); try { yield exec.exec('make compile'); - yield exec.exec('make', [`${target}`], options); + if (target.includes('custom') && customTarget !== '') { + const customOption = `${target.substr(1).toUpperCase()}_TARGET=${customTarget}`; + yield exec.exec('make', [`${target}`, `${customOption}`], options); + } + else { + yield exec.exec('make', [`${target}`], options); + } } catch (error) { core.setFailed(error.message); diff --git a/src/aqa.ts b/src/aqa.ts index 9c4b375..ec83bc4 100644 --- a/src/aqa.ts +++ b/src/aqa.ts @@ -7,6 +7,7 @@ async function run(): Promise { 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}) // let arch = core.getInput("architecture", { required: false }) if ( jdksource !== 'upstream' && @@ -35,7 +36,7 @@ async function run(): Promise { ) } - await runaqa.runaqaTest(version, jdksource, buildList, target) + await runaqa.runaqaTest(version, jdksource, buildList, target, customTarget) } catch (error) { core.setFailed(error.message) } diff --git a/src/runaqa.ts b/src/runaqa.ts index b78200f..49cb742 100644 --- a/src/runaqa.ts +++ b/src/runaqa.ts @@ -11,7 +11,8 @@ export async function runaqaTest( version: string, jdksource: string, buildList: string, - target: string + target: string, + customTarget: string ): Promise { await installDependency() process.env.BUILD_LIST = buildList @@ -36,7 +37,12 @@ export async function runaqaTest( process.chdir('TKG') try { await exec.exec('make compile') - await exec.exec('make', [`${target}`], options) + if (target.includes('custom') && customTarget !== '') { + const customOption = `${target.substr(1).toUpperCase()}_TARGET=${customTarget}` + await exec.exec('make', [`${target}`, `${customOption}`], options) + } else { + await exec.exec('make', [`${target}`], options) + } } catch (error) { core.setFailed(error.message) }