Skip to content

Commit 30786de

Browse files
authored
[SYCL][E2E] Fix allowlist test by removing special characters from the regex. (#10030)
Some device names can contain square brackets. This was making the regex generated by the allowlist test invalid. This commit removes the square brakets from the generated regex.
1 parent 042479c commit 30786de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sycl/test-e2e/Config/allowlist.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ static void replaceSpecialCharacters(std::string &Str) {
2323
// Replace common special symbols with '.' which matches to any character
2424
std::replace_if(
2525
Str.begin(), Str.end(),
26-
[](const char Sym) { return '(' == Sym || ')' == Sym; }, '.');
26+
[](const char Sym) {
27+
return '(' == Sym || ')' == Sym || '[' == Sym || ']' == Sym;
28+
},
29+
'.');
2730
}
2831

2932
int main() {

0 commit comments

Comments
 (0)