diff --git a/vars/checkout_repo.groovy b/vars/checkout_repo.groovy index 07e9d7035..f6806c0af 100644 --- a/vars/checkout_repo.groovy +++ b/vars/checkout_repo.groovy @@ -39,7 +39,7 @@ Map checkout_report_errors(scm_config) { Map checkout_repo() { def scm_config - if (env.TARGET_REPO == 'tls' && env.CHECKOUT_METHOD == 'scm') { + if (env.TARGET_REPO != 'example' && env.CHECKOUT_METHOD == 'scm') { scm_config = scm } else { scm_config = parametrized_repo(env.MBED_TLS_REPO, env.MBED_TLS_BRANCH) diff --git a/vars/environ.groovy b/vars/environ.groovy index 20e06e8e7..1ef113a44 100644 --- a/vars/environ.groovy +++ b/vars/environ.groovy @@ -28,13 +28,15 @@ def set_common_environment() { env.MAKEFLAGS = '-j2' } -def set_tls_pr_environment(is_production) { +void set_tls_pr_environment(boolean is_production, String repo='tls') { set_common_environment() env.JOB_TYPE = 'PR' - env.TARGET_REPO = 'tls' + env.TARGET_REPO = repo if (is_production) { set_common_pr_production_environment() - set_tls_pr_production_environment() + if (repo == 'tls') { + set_tls_pr_production_environment() + } } else { env.CHECKOUT_METHOD = 'parametrized' } @@ -42,11 +44,7 @@ def set_tls_pr_environment(is_production) { def set_common_pr_production_environment() { env.CHECKOUT_METHOD = 'scm' - if (env.BRANCH_NAME ==~ /PR-\d+-merge/) { - env.RUN_ABI_CHECK = 'true' - } else { - env.RUN_FREEBSD = 'true' - env.RUN_WINDOWS_TEST = 'true' + if (!(env.BRANCH_NAME ==~ /PR-\d+-merge/)) { env.RUN_ALL_SH = 'true' } /* Extract owner and repository from the repo url - needed for testing Github merge queues @@ -61,6 +59,12 @@ def set_common_pr_production_environment() { } def set_tls_pr_production_environment() { + if (env.BRANCH_NAME ==~ /PR-\d+-merge/) { + env.RUN_ABI_CHECK = 'true' + } else { + env.RUN_FREEBSD = 'true' + env.RUN_WINDOWS_TEST = 'true' + } env.MBED_TLS_BRANCH = env.CHANGE_BRANCH } diff --git a/vars/mbedtls.groovy b/vars/mbedtls.groovy index f889013e7..8d5105bb3 100644 --- a/vars/mbedtls.groovy +++ b/vars/mbedtls.groovy @@ -46,7 +46,7 @@ def run_tls_tests(label_prefix='') { } /* main job */ -def run_pr_job(is_production=true) { +void run_pr_job(boolean is_production=true, String repo='tls') { analysis.main_record_timestamps('run_pr_job') { try { if (is_production) { @@ -78,7 +78,7 @@ def run_pr_job(is_production=true) { ]) } - environ.set_tls_pr_environment(is_production) + environ.set_tls_pr_environment(is_production, repo) common.maybe_notify_github('PENDING', 'In progress') if (!common.is_open_ci_env && env.BRANCH_NAME ==~ /gh-readonly-queue\/.*/) { diff --git a/vars/psa_crypto.groovy b/vars/psa_crypto.groovy new file mode 100755 index 000000000..032e134ab --- /dev/null +++ b/vars/psa_crypto.groovy @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018-2023, Arm Limited, All Rights Reserved + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This file is part of Mbed TLS (https://www.trustedfirmware.org/projects/mbed-tls/) + */ + +void run_pr_job() { + mbedtls.run_pr_job(true, 'crypto') +}