Skip to content

Commit e13d6cd

Browse files
authored
Merge pull request #15678 from tamasvajk/fix/integration-test-paths
C#: Modify reported assembly paths in integration tests
2 parents 8bbfb82 + e1e29f2 commit e13d6cd

File tree

16 files changed

+799
-792
lines changed

16 files changed

+799
-792
lines changed

csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/Assemblies.expected

Lines changed: 235 additions & 235 deletions
Large diffs are not rendered by default.

csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/Assemblies.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ private string getPath(Assembly a) {
44
not a.getCompilation().getOutputAssembly() = a and
55
exists(string s | s = a.getFile().getAbsolutePath() |
66
result =
7-
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
8-
"/packages".length(), s.length())
7+
"[...]" +
8+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
9+
"/packages".length(), s.length())
910
or
1011
result = s and
1112
not exists(s.indexOf("test-db/working/"))

csharp/ql/integration-tests/posix-only/standalone_dependencies/Assemblies.expected

Lines changed: 166 additions & 166 deletions
Large diffs are not rendered by default.

csharp/ql/integration-tests/posix-only/standalone_dependencies/Assemblies.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ private string getPath(Assembly a) {
44
not a.getCompilation().getOutputAssembly() = a and
55
exists(string s | s = a.getFile().getAbsolutePath() |
66
result =
7-
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
8-
"/packages".length(), s.length())
7+
"[...]" +
8+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
9+
"/packages".length(), s.length())
910
or
1011
result = s and
1112
not exists(s.indexOf("test-db/working/"))

csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/Assemblies.expected

Lines changed: 163 additions & 163 deletions
Large diffs are not rendered by default.

csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/Assemblies.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ private string getPath(Assembly a) {
44
not a.getCompilation().getOutputAssembly() = a and
55
exists(string s | s = a.getFile().getAbsolutePath() |
66
result =
7-
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
8-
"/packages".length(), s.length())
7+
"[...]" +
8+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
9+
"/packages".length(), s.length())
910
or
1011
result = s and
1112
not exists(s.indexOf("test-db/working/"))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| /packages/newtonsoft.json/6.0.4/lib/net45/Newtonsoft.Json.dll |
1+
| [...]/packages/newtonsoft.json/6.0.4/lib/net45/Newtonsoft.Json.dll |

csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/Assemblies.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ private string getPath(Assembly a) {
44
not a.getCompilation().getOutputAssembly() = a and
55
exists(string s | s = a.getFile().getAbsolutePath() |
66
result =
7-
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16, s.length())
7+
"[...]" +
8+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16, s.length())
89
or
910
result = s and
1011
not exists(s.indexOf("test-db/working/"))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| /Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll |
1+
| [...]/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll |

csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/Assemblies.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ private string getPath(Assembly a) {
44
not a.getCompilation().getOutputAssembly() = a and
55
exists(string s | s = a.getFile().getAbsolutePath() |
66
result =
7-
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
8-
"/legacypackages".length(), s.length())
7+
"[...]" +
8+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
9+
"/legacypackages".length(), s.length())
910
// TODO: include all other assemblies from the test results. Initially disable because mono installations were problematic on ARM runners.
1011
)
1112
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| newtonsoft.json/13.0.3/lib/net6.0/Newtonsoft.Json.dll |
1+
| [...]/newtonsoft.json/13.0.3/lib/net6.0/Newtonsoft.Json.dll |

csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/Assemblies.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import csharp
33
private string getPath(Assembly a) {
44
not a.getCompilation().getOutputAssembly() = a and
55
exists(string s | s = a.getFile().getAbsolutePath() |
6-
result = s.substring(s.indexOf("newtonsoft.json"), s.length())
6+
result = "[...]/" + s.substring(s.indexOf("newtonsoft.json"), s.length())
77
)
88
}
99

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| /Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll |
1+
| [...]/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll |

csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/Assemblies.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ private string getPath(Assembly a) {
44
not a.getCompilation().getOutputAssembly() = a and
55
exists(string s | s = a.getFile().getAbsolutePath() |
66
result =
7-
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
8-
"/legacypackages".length(), s.length())
7+
"[...]" +
8+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
9+
"/legacypackages".length(), s.length())
910
// TODO: include all other assemblies from the test results. Initially disable because mono installations were problematic on ARM runners.
1011
)
1112
}

csharp/ql/integration-tests/windows-only/standalone_dependencies/Assemblies.expected

Lines changed: 210 additions & 210 deletions
Large diffs are not rendered by default.

csharp/ql/integration-tests/windows-only/standalone_dependencies/Assemblies.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ private string getPath(Assembly a) {
44
not a.getCompilation().getOutputAssembly() = a and
55
exists(string s | s = a.getFile().getAbsolutePath() |
66
result =
7-
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
8-
"/packages".length(), s.length())
7+
"[...]" +
8+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
9+
"/packages".length(), s.length())
910
or
1011
result = s and
1112
not exists(s.indexOf("test-db/working/"))

0 commit comments

Comments
 (0)