From 93166f87566e6d6a58362161e3c221584db36dff Mon Sep 17 00:00:00 2001 From: "igor.udot" Date: Tue, 9 Jan 2024 10:03:30 +0800 Subject: [PATCH] feat(unity_test): print stage number when unity test run --- components/unity/unity_runner.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/unity/unity_runner.c b/components/unity/unity_runner.c index c4cb7ecc55..3362f66568 100644 --- a/components/unity/unity_runner.c +++ b/components/unity/unity_runner.c @@ -91,6 +91,13 @@ static int multiple_function_option(const test_desc_t *test_ms) } selection = atoi((const char *) cmdline) - 1; if (selection >= 0 && selection < test_ms->test_fn_count) { + UnityPrint("Running stage "); + UnityPrintNumber(selection + 1); + UnityPrint("..."); + UNITY_PRINT_EOL(); + // Unit test runner expects to see test name before the test starts + UNITY_OUTPUT_FLUSH(); + unity_default_test_run(test_ms->fn[selection], test_ms->name, test_ms->line); } else { UnityPrint("Invalid selection, your should input number 1-");