Skip to content

Commit 04f0fb0

Browse files
committed
Add integration test with mono assemblies as references
1 parent 4e022e2 commit 04f0fb0

File tree

8 files changed

+281
-0
lines changed

8 files changed

+281
-0
lines changed

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

Lines changed: 242 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import csharp
2+
3+
private string getPath(Assembly a) {
4+
not a.getCompilation().getOutputAssembly() = a and
5+
exists(string s | s = a.getFile().getAbsolutePath() |
6+
result =
7+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16, s.length())
8+
or
9+
result = s and
10+
not exists(s.indexOf("test-db/working/"))
11+
)
12+
}
13+
14+
from Assembly a
15+
select getPath(a)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Program
2+
{
3+
static void Main(string[] args)
4+
{
5+
}
6+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.101"
4+
}
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net461" />
4+
<package id="NUnit.ConsoleRunner" version="3.12.0" />
5+
</packages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
4+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from create_database_utils import *
2+
3+
run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"])

0 commit comments

Comments
 (0)