From ae911d4b01531ff2d1934ba0da292dfca43bde38 Mon Sep 17 00:00:00 2001 From: Julia Zhang Date: Tue, 5 Dec 2023 16:15:56 +0800 Subject: [PATCH] Let cts can skip commented cases in caselist file Add a new else if in parseCaseList() to skip commented line of caselist file. With this we can skip some less important test cases that may cause system hang or crash and let the whole test finish. Signed-off-by: Julia Zhang --- framework/common/tcuCommandLine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framework/common/tcuCommandLine.cpp b/framework/common/tcuCommandLine.cpp index 99c6faa271..9b4eab9c27 100644 --- a/framework/common/tcuCommandLine.cpp +++ b/framework/common/tcuCommandLine.cpp @@ -498,6 +498,15 @@ static void parseCaseList (CaseTreeNode* root, std::istream& in) } else if (isValidTestCaseNameChar((char)curChr)) curName += (char)curChr; + else if (curChr == '#') { + int curChr_tmp = curChr; + while (curChr_tmp != '\n') { + curChr_tmp = in.get(); + curName += (char)curChr_tmp; + } + std::cout << "Skip test case: " << curName << "\n"; + curName.clear(); + } else throw std::invalid_argument("Illegal character in test case name"); }