Skip to content

Commit 933a8e6

Browse files
committed
Add integration test for missing nuget package sources
1 parent 566351a commit 933a8e6

File tree

9 files changed

+44
-0
lines changed

9 files changed

+44
-0
lines changed

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

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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 +
8+
"/legacypackages".length(), s.length())
9+
// TODO: include all other assemblies from the test results. Initially disable because mono installations were problematic on ARM runners.
10+
)
11+
}
12+
13+
from Assembly a
14+
select getPath(a)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<!-- Remove all nuget package sources to force adding the default feed in the extraction root. -->
5+
<clear />
6+
</packageSources>
7+
</configuration>
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: 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+
<packages>
3+
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net461" />
4+
</packages>
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>
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: 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([], source="proj", lang="csharp", extra_args=["--extractor-option=buildless=true", "--extractor-option=cil=false"])

0 commit comments

Comments
 (0)