From b2c1f510ea58de460543c501afe290057de9a3c9 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Tue, 5 Oct 2021 19:35:25 -0500 Subject: [PATCH] Use exit code to signal failure + copyright --- tools/projects_sort.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/projects_sort.py b/tools/projects_sort.py index b31146294..d4d23dfad 100755 --- a/tools/projects_sort.py +++ b/tools/projects_sort.py @@ -2,6 +2,7 @@ # # DAPLink Interface Firmware # Copyright (c) 2009-2021, Arm Limited, All Rights Reserved +# Copyright (c) 2021 Mathias Brossard # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -48,17 +49,18 @@ boards.append(p) hics.sort() +boards.sort() +all_sorted = hics + boards + for p in hics: print(p) print() -boards.sort() for p in boards: print(p) -all_sorted = hics + boards for i in range(len(project_list)): if project_list[i] != all_sorted[i]: sys.stderr.write("Found '%s' expected '%s'\n" % (project_list[i], all_sorted[i])) - break + exit(-1) exit(0)