C tests: generalize arguments tests

With the coming `codeql test` support, the `predefined_macros` file will not
necessarily be located under a `tools` directory. Change the test to hide more
of its actual path, so it will work in both cases.
This commit is contained in:
Henning Makholm
2019-12-06 01:18:21 +01:00
parent fa8e5e6793
commit 6bdf186d1e
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@
| arguments.c | 12 | linux_x86_64 |
| arguments.c | 13 | --gcc |
| arguments.c | 14 | --predefined_macros |
| arguments.c | 15 | <root>/tools/qltest/predefined_macros |
| arguments.c | 15 | <tools>/qltest/predefined_macros |
| arguments.c | 16 | -w |
| arguments.c | 17 | -Werror |
| arguments.c | 18 | arguments.c |

View File

@@ -7,5 +7,5 @@ where
s = c
.getArgument(i)
.replaceAll("\\", "/")
.regexpReplaceAll(".*(tools/qltest/predefined_macros)", "<root>/$1")
.regexpReplaceAll(".*(/qltest/predefined_macros)", "<tools>$1")
select c.getAFileCompiled().toString(), i, s