From f10e58f8e9ede5aa9c325ae2441bd74d5b056597 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 2 Nov 2023 22:40:14 +0100 Subject: [PATCH] tesh: helpful message on syntax error --- MANIFEST.in | 14 ++++++++++++++ tools/tesh/tesh.py | 11 ++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index adda74c968..0eec0465f0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -676,8 +676,22 @@ include teshsuite/mc/dwarf-expression/dwarf-expression.cpp include teshsuite/mc/dwarf-expression/dwarf-expression.tesh include teshsuite/mc/dwarf/dwarf.cpp include teshsuite/mc/dwarf/dwarf.tesh +include teshsuite/mc/mcmini/barber_shop_deadlock.c +include teshsuite/mc/mcmini/barber_shop_deadlock.tesh include teshsuite/mc/mcmini/barber_shop_ok.c include teshsuite/mc/mcmini/barber_shop_ok.tesh +include teshsuite/mc/mcmini/philosophers_mutex_deadlock.c +include teshsuite/mc/mcmini/philosophers_mutex_deadlock.tesh +include teshsuite/mc/mcmini/philosophers_mutex_ok.c +include teshsuite/mc/mcmini/philosophers_mutex_ok.tesh +include teshsuite/mc/mcmini/philosophers_semaphores_deadlock.c +include teshsuite/mc/mcmini/philosophers_semaphores_deadlock.tesh +include teshsuite/mc/mcmini/philosophers_semaphores_ok.c +include teshsuite/mc/mcmini/philosophers_semaphores_ok.tesh +include teshsuite/mc/mcmini/producer_consumer_deadlock.c +include teshsuite/mc/mcmini/producer_consumer_deadlock.tesh +include teshsuite/mc/mcmini/producer_consumer_ok.c +include teshsuite/mc/mcmini/producer_consumer_ok.tesh include teshsuite/mc/mutex-handling/mutex-handling.cpp include teshsuite/mc/mutex-handling/mutex-handling.tesh include teshsuite/mc/mutex-handling/without-mutex-handling.tesh diff --git a/tools/tesh/tesh.py b/tools/tesh/tesh.py index 9a4f92441c..856dab0913 100755 --- a/tools/tesh/tesh.py +++ b/tools/tesh/tesh.py @@ -710,7 +710,16 @@ def main(): cmd.add_ignore(line[len("! ignore "):]) else: - fatal_error(f"UNRECOGNIZED OPTION LINE: {line}") + fatal_error(f"UNRECOGNIZED OPTION LINE: {line}\n" + "Valid requests:\n" + " ! output ignore\n" + " ! output sort\n" + " ! output display\n" + " ! setenv XX=YY\n" + " ! ignore XYZ\n" + " ! expect return NN\n" + " ! expect signal NN\n" + " ! timeout NN\n") line = file.readfullline() -- 2.20.1