Skip to content

Commit df69ed1

Browse files
Rename the source build SmokeTests to just source build tests (#44514)
Co-authored-by: Matt Thalman <[email protected]>
1 parent 2e7615d commit df69ed1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+75
-73
lines changed

eng/pipelines/templates/jobs/vmr-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ jobs:
442442
env:
443443
Token: $(dn-bot-dnceng-artifact-feeds-rw)
444444

445-
- script: cp "$(sourcesPath)/src/sdk/NuGet.config" "$(sourcesPath)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config"
445+
- script: cp "$(sourcesPath)/src/sdk/NuGet.config" "$(sourcesPath)/test/Microsoft.DotNet.SourceBuild.Tests/assets/online.NuGet.Config"
446446
displayName: Copy Test NuGet Config for Smoke Tests
447447

448448
- script: |
@@ -468,7 +468,7 @@ jobs:
468468
if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then
469469
customBuildArgs="$customBuildArgs --poison"
470470
fi
471-
customBuildArgs="$customBuildArgs --source-only /p:SmokeTestsWarnOnSdkContentDiffs=true /p:SmokeTestsExcludeOmniSharpTests=${{ parameters.excludeOmniSharpTests }}"
471+
customBuildArgs="$customBuildArgs --source-only /p:SourceBuildTestsExcludeOmniSharpTests=${{ parameters.excludeOmniSharpTests }}"
472472
fi
473473
474474
if [[ -n "${{ parameters.targetRid }}" ]]; then

src/SourceBuild/content/docs/license-scanning.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@ The VMR is regularly scanned for license references to ensure that only open-sou
44

55
License scanning pipline: https://dev.azure.com/dnceng/internal/_build?definitionId=1301 (internal only)
66

7-
License scanning test: https://github.com/dotnet/dotnet/blob/main/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs
7+
License scanning test: https://github.com/dotnet/dotnet/blob/main/test/Microsoft.DotNet.SourceBuild.Tests/LicenseScanTests.cs
88

99
By default, running the pipeline will scan all repos within the VMR which takes several hours to run.
1010
The pipeline can be triggered manually to target a specific repo within the VMR by setting the `specificRepoName` parameter.
1111
This value should be the name of the repo within the VMR (i.e. a name of a directory within https://github.com/dotnet/dotnet/tree/main/src).
1212
To test source modifications intended to resolve a license issue, apply the change in an internal branch of the VMR.
1313
Run this pipeline, targeting your branch, and set the `specificRepoName` parameter to the name of the repo containing the change.
1414

15-
The output of the pipeline is a set of test results and logs.
16-
The logs are published as an artifact and can be found at test/Microsoft.DotNet/SourceBuild.SmokeTests/bin/Release/netX.0/logs.
17-
It consists of the following:
18-
* `UpdatedLicenses.<repo-name>.json`: This is the output of that gets compared to the stored baseline.
19-
If they're the same, the test passes; if not, it fails. By comparing this file to the baseline, one can determine which new license
20-
references have been introduced.
21-
If everything is deemed to be acceptable, the developer can either update the allowed licenses, update the exclusions file, update the
22-
baseline, or any combination.
23-
* `scancode-results.json`: This is the raw output that comes from scancode. This file is useful for diagnostic purposes because it tells you
24-
the exact line number of where a license has been detected in a file.
15+
The output of the pipeline is a set of test results and logs which can be found at `LicenseScan {RepoName}_BuildLogs_Attempt{n}/artifacts`
16+
The test results consists of the following:
17+
18+
* `UpdatedLicenses.<repo-name>.json`: This is the output of the license scan tool that gets compared to the stored baseline.
19+
If they're the same, the test passes; if not, it fails.
20+
By comparing this file to the baseline, one can determine which new license references have been introduced.
21+
If everything is deemed to be acceptable, the developer can either update the allowed licenses, update the exclusions file, update the baseline, or any combination.
22+
* `scancode-results.json`: This is the raw output that comes from scancode.
23+
This file is useful for diagnostic purposes because it tells you the exact line number of where a license has been detected in a file.

src/SourceBuild/content/eng/pipelines/templates/jobs/sdk-diff-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
exit 1
109109
fi
110110
111-
eng/common/build.sh -bl --projects $(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj --restore
111+
eng/common/build.sh -bl --projects $(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.Tests/Microsoft.DotNet.SourceBuild.Tests.csproj --restore
112112
113113
echo "##vso[task.setvariable variable=Platform]$platform"
114114
echo "##vso[task.setvariable variable=MsftSdkTarballPath]$(Pipeline.Workspace)/Artifacts/$msft_sdk_tarball_name"
@@ -119,7 +119,7 @@ jobs:
119119
120120
- script: >
121121
.dotnet/dotnet test
122-
$(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj
122+
$(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.Tests/Microsoft.DotNet.SourceBuild.Tests.csproj
123123
--filter "Category=SdkContent"
124124
--logger:'trx;LogFileName=$(Agent.JobName)_SDKDiffTests.trx'
125125
--logger:'console;verbosity=detailed'
@@ -130,7 +130,7 @@ jobs:
130130
/p:MsftSdkTarballPath=$(MsftSdkTarballPath)
131131
/p:SdkTarballPath=$(SdkTarballPath)
132132
/p:SourceBuiltArtifactsPath=$(SourceBuiltArtifactsPath)
133-
/p:SmokeTestsWarnOnSdkContentDiffs=false
133+
/p:SourceBuildTestsWarnOnSdkContentDiffs=false
134134
/p:TargetRid=${{ parameters.targetRid }}
135135
/p:PortableRid=$(Platform)-${{ parameters.architecture }}
136136
displayName: Run Tests
@@ -168,6 +168,6 @@ jobs:
168168
parameters:
169169
pipeline: sdk
170170
repo: dotnet/sdk
171-
originalFilesDirectory: src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets
171+
originalFilesDirectory: src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets
172172
updatedFilesDirectory: $(Build.StagingDirectory)/BuildLogs
173173
pullRequestTitle: Update Source-Build SDK Diff Tests Baselines and Exclusions

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ trigger:
2424
- internal/release/*.0.1xx*
2525
paths:
2626
include:
27-
- test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs
28-
- test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseScanTests
27+
- test/Microsoft.DotNet.SourceBuild.Tests/LicenseScanTests.cs
28+
- test/Microsoft.DotNet.SourceBuild.Tests/assets/LicenseScanTests
2929

3030
parameters:
3131
# Provides a way to scan a specific repo. If not provided, all repos of the VMR will be scanned.
@@ -124,16 +124,16 @@ extends:
124124

125125
- script: >
126126
$(Build.SourcesDirectory)/.dotnet/dotnet test
127-
$(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj
128-
--filter "FullyQualifiedName=Microsoft.DotNet.SourceBuild.SmokeTests.LicenseScanTests.ScanForLicenses"
127+
$(Build.SourcesDirectory)/test/Microsoft.DotNet.SourceBuild.Tests/Microsoft.DotNet.SourceBuild.Tests.csproj
128+
--filter "FullyQualifiedName=Microsoft.DotNet.SourceBuild.Tests.LicenseScanTests.ScanForLicenses"
129129
--logger:'trx;LogFileName=$(Agent.JobName)_LicenseScan.trx'
130130
--logger:'console;verbosity=detailed'
131131
-c Release
132132
-bl:$(Build.SourcesDirectory)/artifacts/log/Debug/BuildTests_$(date +"%m%d%H%M%S").binlog
133133
-flp:LogFile=$(Build.SourcesDirectory)/artifacts/logs/BuildTests_$(date +"%m%d%H%M%S").log
134134
-clp:v=m
135-
/p:SmokeTestsLicenseScanPath=$(repoPath)
136-
/p:SmokeTestsWarnOnLicenseScanDiffs=false
135+
/p:SourceBuildTestsLicenseScanPath=$(repoPath)
136+
/p:SourceBuildTestsWarnOnLicenseScanDiffs=false
137137
/p:TargetRid=linux-x64
138138
/p:PortableRid=linux-x64
139139
/p:SkipPrepareSdkArchive=true
@@ -204,6 +204,6 @@ extends:
204204
parameters:
205205
pipeline: license
206206
repo: dotnet/sdk
207-
originalFilesDirectory: src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/LicenseScanTests
207+
originalFilesDirectory: src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/LicenseScanTests
208208
updatedFilesDirectory: $(Pipeline.Workspace)/Artifacts
209209
pullRequestTitle: Update Source-Build License Scan Baselines and Exclusions

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ArtifactsSizeTests.cs renamed to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/ArtifactsSizeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
using Xunit;
1616
using Xunit.Abstractions;
1717

18-
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
18+
namespace Microsoft.DotNet.SourceBuild.Tests;
1919

2020
public class ArtifactsSizeTests : SdkTests
2121
{

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs renamed to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/BaselineHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using Xunit;
1313
using Xunit.Abstractions;
1414

15-
namespace Microsoft.DotNet.SourceBuild.SmokeTests
15+
namespace Microsoft.DotNet.SourceBuild.Tests
1616
{
1717
internal class BaselineHelper
1818
{

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs renamed to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/BasicScenarioTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Xunit;
99
using Xunit.Abstractions;
1010

11-
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
11+
namespace Microsoft.DotNet.SourceBuild.Tests;
1212

1313
/// <summary>
1414
/// Basic project create, build, run, publish scenario tests.

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs renamed to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/Config.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
[assembly:UnsupportedOSPlatform("windows")]
1010

11-
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
11+
namespace Microsoft.DotNet.SourceBuild.Tests;
1212

1313
internal static class Config
1414
{
15-
const string ConfigSwitchPrefix = "Microsoft.DotNet.SourceBuild.SmokeTests.";
15+
const string ConfigSwitchPrefix = "Microsoft.DotNet.SourceBuild.Tests.";
1616

1717
public static string DotNetDirectory => (string)AppContext.GetData(ConfigSwitchPrefix + nameof(DotNetDirectory))! ?? throw new InvalidOperationException("DotNetDirectory must be specified");
1818
public static string PortableRid => (string)AppContext.GetData(ConfigSwitchPrefix + nameof(PortableRid))! ?? throw new InvalidOperationException("Portable RID must be specified");

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DebugTestOutputHelper.cs renamed to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/DebugTestOutputHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Diagnostics;
66
using Xunit.Abstractions;
77

8-
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
8+
namespace Microsoft.DotNet.SourceBuild.Tests;
99

1010
internal class DebugTestOutputHelper : ITestOutputHelper
1111
{

src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DebugTests.cs renamed to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/DebugTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using Xunit;
1111
using Xunit.Abstractions;
1212

13-
namespace Microsoft.DotNet.SourceBuild.SmokeTests;
13+
namespace Microsoft.DotNet.SourceBuild.Tests;
1414

1515
public class DebugTests : SdkTests
1616
{

0 commit comments

Comments
 (0)