mirror of
https://github.com/github/codeql.git
synced 2026-08-05 18:03:27 +02:00
We are no longer bound to the platform-specific directories, so simplify the test organization. If you don't want this change, just skip merging this PR. It's purely optional. This is not very invasive for C#, I'm just dropping the `only` suffix. You could also merge all the platform-specific test dirs, or all test dirs into the top-level directory. I'll leave that up to you.
17 lines
469 B
Plaintext
17 lines
469 B
Plaintext
import csharp
|
|
|
|
private string getPath(Assembly a) {
|
|
not a.getCompilation().getOutputAssembly() = a and
|
|
exists(string s | s = a.getFile().getAbsolutePath() |
|
|
exists(string sub | sub = "csharp/tools/" + ["osx64", "linux64"] |
|
|
result = "[...]/csharp/tools/[...]" + s.substring(s.indexOf(sub) + sub.length(), s.length())
|
|
)
|
|
or
|
|
result = s and
|
|
not exists(s.indexOf(["test-db/working/", "csharp/tools/"]))
|
|
)
|
|
}
|
|
|
|
from Assembly a
|
|
select getPath(a)
|