From bd66d184ff9acb4f62ffeebeca2bb938823fc495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Wed, 3 Nov 2021 11:32:51 +0100 Subject: [PATCH] Keep local clone around even if the test succeeds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bence Szépkúti --- .gitignore | 3 +++ tests/scripts/test_psa_compliance.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5a5860938..358262f49 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,9 @@ massif-* # Generated documentation: /apidoc +# PSA Crypto compliance test repo, cloned by test_psa_complaince.py +/psa-arch-tests + # Editor navigation files: /GPATH /GRTAGS diff --git a/tests/scripts/test_psa_compliance.py b/tests/scripts/test_psa_compliance.py index 33207c014..2f67f08c8 100755 --- a/tests/scripts/test_psa_compliance.py +++ b/tests/scripts/test_psa_compliance.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Run the PSA Cryto API compliance test suite. Clone the repo and check out the commit specified by PSA_ARCH_TEST_REPO and PSA_ARCH_TEST_REF, -then complie and run the test suite. +then complie and run the test suite. The clone is stored at /psa-arch-tests. Known defects in either the test suite or mbedtls - identified by their test number - are ignored, while unexpected failures AND successes are reported as errors, to help keep the list of known defects as up to date as possible. @@ -46,6 +46,7 @@ def main(): try: os.chdir(psa_arch_tests_dir) + # Reuse existing local clone subprocess.check_call(['git', 'init']) subprocess.check_call(['git', 'fetch', PSA_ARCH_TESTS_REPO, PSA_ARCH_TESTS_REF]) subprocess.check_call(['git', 'checkout', 'FETCH_HEAD']) @@ -117,7 +118,6 @@ def main(): print('FAILED') return 1 else: - shutil.rmtree(psa_arch_tests_dir) print('SUCCESS') return 0 finally: