Skip to content

Commit 47196e5

Browse files
committed
Run Crypto abi-check in TF-PSA-Crypto PRs
Running the TLS ABI check doesn't do much, since both HEAD and FETCH_HEAD point to the same commit in a Crypto PR-merge job. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
1 parent e5a2cf3 commit 47196e5

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/org/mbed/tls/jenkins/BranchInfo.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class BranchInfo {
3232
* if no platform has been chosen yet. */
3333
public Map<String, String> all_sh_components
3434

35+
/** Whether scripts/abi_check.py is available.
36+
* Should only be necessary temporary, while we add ABI check support to
37+
* TF PSA Crypto */
38+
public boolean has_branch_info
39+
3540
/** Whether scripts/min_requirements.py is available. Older branches don't
3641
* have it, so they only get what's hard-coded in the docker files on Linux,
3742
* and bare python on other platforms. */
@@ -72,6 +77,7 @@ class BranchInfo {
7277
this.stash = ''
7378
this.framework_override = ''
7479
this.all_sh_components = [:]
80+
this.has_branch_info = false
7581
this.has_min_requirements = false
7682
this.python_requirements_override_content = ''
7783
this.python_requirements_override_file = ''

vars/common.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ List<BranchInfo> get_branch_information(Collection<String> tls_branches, Collect
284284
deleteDir()
285285
checkout_repo.checkout_repo(info)
286286

287+
// If a TLS branch doesn't have scripts/abi_check.py, something has gone wrong.
288+
info.has_branch_info = repo == 'tls' || fileExists('scripts/abi_check.py')
289+
287290
info.has_min_requirements = fileExists('scripts/min_requirements.py')
288291

289292
if (info.has_min_requirements) {

vars/mbedtls.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void run_tls_tests(Collection<BranchInfo> infos) {
3333
infos.each { info ->
3434
jobs << gen_jobs.gen_release_jobs(info, false)
3535

36-
if (env.RUN_ABI_CHECK == "true" && info.repo == 'tls') {
36+
if (env.RUN_ABI_CHECK == 'true' && info.repo == env.TARGET_REPO && info.has_branch_info) {
3737
jobs << gen_jobs.gen_abi_api_checking_job(info, 'ubuntu-18.04-amd64')
3838
}
3939
}

0 commit comments

Comments
 (0)