From c8abbe21a65d12f55005d7237bf5ee3bcffd4382 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 16 Jan 2023 23:40:33 +0100 Subject: [PATCH] Require new tests.toml for apps v2 --- package_linter.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/package_linter.py b/package_linter.py index 7b01984..76a156a 100755 --- a/package_linter.py +++ b/package_linter.py @@ -999,16 +999,23 @@ class Configurations(TestSuite): ############################ @test() - def check_process_exists(self): + def tests_toml_exists(self): app = self.app - check_process_file = app.path + "/check_process" - if not file_exists(check_process_file): - yield Warning( - "You should add a 'check_process' file to properly interface with the continuous integration system" - ) + if app_packaging_format <= 1: + check_process_file = app.path + "/check_process" + if not file_exists(check_process_file): + yield Warning( + "You should add a 'check_process' file to properly interface with the continuous integration system" + ) + else: + tests_toml_file = app.path + "/tests.toml" + if not file_exists(tests_toml_file): + yield Error( + "The 'check_process' file that interfaces with the app CI has now been replaced with 'tests.toml' format and is now mandatory for apps v2." + ) @test() def check_process_syntax(self):