Skip to content

Commit 392dcf4

Browse files
[release/9.0.1xx] Update License Scan tests to use container (#51369)
1 parent 6f8f2d1 commit 392dcf4

File tree

3 files changed

+5
-42
lines changed

3 files changed

+5
-42
lines changed

eng/install-scancode.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/SourceBuild/content/eng/pipelines/vmr-license-scan.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ jobs:
7575
7676
- job: LicenseScan
7777
dependsOn: Setup
78+
container:
79+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-source-build-test-amd64
80+
options: '--memory=6g'
7881
pool:
7982
name: NetCore1ESPool-Svc-Internal
8083
demands: ImageOverride -equals 1es-ubuntu-2204
@@ -83,23 +86,8 @@ jobs:
8386
matrix: $[ dependencies.Setup.outputs['GetMatrix.matrix'] ]
8487
steps:
8588

86-
- script: |
87-
source ./eng/common/tools.sh
88-
InitializeDotNetCli true
89-
displayName: Install .NET SDK
90-
workingDirectory: $(Build.SourcesDirectory)
91-
92-
- task: PipAuthenticate@1
93-
displayName: 'Pip Authenticate'
94-
inputs:
95-
artifactFeeds: public/dotnet-public-pypi
96-
onlyAddExtraIndex: false
97-
98-
- script: $(sdkRoot)/eng/install-scancode.sh
99-
displayName: Install Scancode
100-
10189
- script: >
102-
$(Build.SourcesDirectory)/.dotnet/dotnet test
90+
dotnet test
10391
$(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj
10492
--filter "FullyQualifiedName=Microsoft.DotNet.SourceBuild.SmokeTests.LicenseScanTests.ScanForLicenses"
10593
--logger:'trx;LogFileName=$(Agent.JobName)_LicenseScan.trx'

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void ScanForLicenses()
136136
Assert.NotNull(Config.LicenseScanPath);
137137

138138
// Indicates how long until a timeout occurs for scanning a given file
139-
const int FileScanTimeoutSeconds = 300;
139+
const int FileScanTimeoutSeconds = 1800;
140140

141141
string scancodeResultsPath = Path.Combine(Config.LogsDirectory, "scancode-results.json");
142142

0 commit comments

Comments
 (0)