From 38ecf9fa1e6151656c542419d2a0cb8bca182673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gonz=C3=A1lez?= Date: Mon, 4 Sep 2023 10:23:04 +0100 Subject: [PATCH] check_test_cases: Avoid removing duplicated test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One of the jobs of check_test_cases is to check for duplicate test descriptions and to have them ordered: * Stop using a set to collect the different test cases from the test scripts. Signed-off-by: Tomás González --- tests/scripts/check_test_cases.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/scripts/check_test_cases.py b/tests/scripts/check_test_cases.py index 2dddf7a16a..4a3ecef30c 100755 --- a/tests/scripts/check_test_cases.py +++ b/tests/scripts/check_test_cases.py @@ -105,11 +105,14 @@ option""" listed = subprocess.check_output(['sh', file_name, '--list-test-cases']) # Assume test file is responsible for printing identical format of # test case description between --list-test-cases and its OUTCOME.CSV - listed = set(map(lambda x: x.rstrip(), listed.splitlines())) + # # idx indicates the number of test case since there is no line number # in `compat.sh` for each test case. - for idx, description in enumerate(listed): - self.process_test_case(descriptions, file_name, idx, description) + for idx, description in enumerate(listed.splitlines()): + self.process_test_case(descriptions, + file_name, + idx, + description.rstrip()) @staticmethod def collect_test_directories():