Skip to content

Commit ad66401

Browse files
pakrymJohn Luo
authored andcommitted
EnableAzurePipelinesReporter for helix
1 parent ea5e955 commit ad66401

File tree

9 files changed

+46
-19
lines changed

9 files changed

+46
-19
lines changed

.azure/pipelines/helix-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
steps:
1818
- script: .\build.cmd -all -ci /t:Helix /p:IsHelixJob=true /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\logs\SendToHelix.binlog
1919
displayName: Run build.cmd helix target
20+
env:
21+
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
2022
artifacts:
2123
- name: Helix_logs
2224
path: artifacts/logs/

build/repo.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
Properties="$(BuildProperties);__DummyTarget=GenerateBuildAssetManifest" />
152152
</Target>
153153

154-
<Target Name="Helix" DependsOnTargets="Restore">
154+
<Target Name="Helix">
155155
<MSBuild Projects="$(MSBuildThisFileDirectory)..\eng\helix\helix.proj"
156156
Targets="Test"
157157
Properties="$(BuildProperties);$(SolutionProperties);"

eng/helix/helix.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<HelixBuild Condition=" '$(CI)' == 'true' ">$(BUILD_BUILDNUMBER)</HelixBuild>
1616
<WaitForWorkItemCompletion Condition=" '$(CI)' == 'true' ">false</WaitForWorkItemCompletion>
1717
<FailOnMissionControlTestFailure>false</FailOnMissionControlTestFailure>
18-
<EnableAzurePipelinesReporter>false</EnableAzurePipelinesReporter>
18+
<EnableAzurePipelinesReporter>true</EnableAzurePipelinesReporter>
1919
<IsExternal>true</IsExternal>
2020
<Creator>aspnetcore</Creator>
2121
<SkipInvalidConfigurations>true</SkipInvalidConfigurations>

eng/helix/vstest/runtests.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ REM only puts the explicit filter traits the user provided in
3636
REM Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
3737
set NONFLAKY_FILTER="Flaky:All!=true&Flaky:Helix:All!=true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue:%HELIX%!=true"
3838
echo Running non-flaky tests.
39-
%DOTNET_ROOT%\dotnet vstest %target% --logger:trx --logger:console;verbosity=normal --TestCaseFilter:%NONFLAKY_FILTER%
39+
%DOTNET_ROOT%\dotnet vstest %target% --logger:trx --TestCaseFilter:%NONFLAKY_FILTER%
4040
if errorlevel 1 (
4141
echo Failure in non-flaky test 1>&2
4242
set exit_code=1
@@ -45,7 +45,7 @@ if errorlevel 1 (
4545

4646
set FLAKY_FILTER="Flaky:All=true|Flaky:Helix:All=true|Flaky:Helix:Queue:All=true|Flaky:Helix:Queue:%HELIX%=true"
4747
echo Running known-flaky tests.
48-
%DOTNET_ROOT%\dotnet vstest %target% --logger:trx --logger:console;verbosity=normal --TestCaseFilter:%FLAKY_FILTER%
48+
%DOTNET_ROOT%\dotnet vstest %target% --logger:trx --TestCaseFilter:%FLAKY_FILTER%
4949
if errorlevel 1 (
5050
echo Failure in flaky test 1>&2
5151
REM DO NOT EXIT and DO NOT SET EXIT_CODE to 1

eng/helix/vstest/runtests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ if [ $nonflaky_exitcode != 0 ]; then
7979
echo "Non-flaky tests failed!" 1>&2
8080
# DO NOT EXIT
8181
fi
82-
8382
FLAKY_FILTER="Flaky:All=true|Flaky:Helix:All=true|Flaky:Helix:Queue:All=true|Flaky:Helix:Queue:$HELIX=true"
8483
echo "Running known-flaky tests."
8584
$DOTNET_ROOT/dotnet vstest $1 --logger:trx --TestCaseFilter:"$FLAKY_FILTER"

eng/targets/Helix.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
<Target Name="_CreateHelixWorkItem" Condition="$(BuildHelixPayload)">
5454

55-
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_PublishHelixArchive" RemoveProperties="HelixTargetQueue" />
55+
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_PublishHelixArchive" RemoveProperties="HelixTargetQueue;TestRunId" />
5656

5757
<ConvertToAbsolutePath Paths="$(PublishDir)">
5858
<Output TaskParameter="AbsolutePaths" PropertyName="PublishAbsoluteDir" />

src/Servers/Kestrel/Kestrel/test/GeneratedCodeTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ public class GeneratedCodeTests
1717
[Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2223", FlakyOn.Helix.All)]
1818
public void GeneratedCodeIsUpToDate()
1919
{
20-
var repositoryRoot = typeof(GeneratedCodeTests).Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().First(f => string.Equals(f.Key, "RepositoryRoot", StringComparison.OrdinalIgnoreCase)).Value;
20+
var repositoryRoot = TestPathUtilities.GetSolutionRootDirectory("Kestrel");
2121

22-
var httpHeadersGeneratedPath = Path.Combine(repositoryRoot, "src/Servers/Kestrel/Core/src/Internal/Http/HttpHeaders.Generated.cs");
23-
var httpProtocolGeneratedPath = Path.Combine(repositoryRoot, "src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.Generated.cs");
24-
var httpUtilitiesGeneratedPath = Path.Combine(repositoryRoot, "src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs");
25-
var transportConnectionGeneratedPath = Path.Combine(repositoryRoot, "src/Servers/Kestrel/Transport.Abstractions/src/Internal/TransportConnection.Generated.cs");
22+
var httpHeadersGeneratedPath = Path.Combine(repositoryRoot, "Kestrel/Core/src/Internal/Http/HttpHeaders.Generated.cs");
23+
var httpProtocolGeneratedPath = Path.Combine(repositoryRoot, "Kestrel/Core/src/Internal/Http/HttpProtocol.Generated.cs");
24+
var httpUtilitiesGeneratedPath = Path.Combine(repositoryRoot, "Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.Generated.cs");
25+
var transportConnectionGeneratedPath = Path.Combine(repositoryRoot, "Kestrel/Transport.Abstractions/src/Internal/TransportConnection.Generated.cs");
2626

2727
var testHttpHeadersGeneratedPath = Path.GetTempFileName();
2828
var testHttpProtocolGeneratedPath = Path.GetTempFileName();

src/Servers/Kestrel/Kestrel/test/Microsoft.AspNetCore.Server.Kestrel.Tests.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.0</TargetFramework>
@@ -9,11 +9,6 @@
99
<Compile Include="$(KestrelSharedSourceRoot)test\*.cs" LinkBase="shared" />
1010
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
1111
<Content Include="$(KestrelSharedSourceRoot)test\TestCertificates\*.pfx" LinkBase="shared\TestCertificates" CopyToOutputDirectory="PreserveNewest" />
12-
13-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
14-
<_Parameter1>RepositoryRoot</_Parameter1>
15-
<_Parameter2>$(RepositoryRoot)</_Parameter2>
16-
</AssemblyAttribute>
1712
</ItemGroup>
1813

1914
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">

src/Servers/Kestrel/test/Interop.FunctionalTests/H2SpecCommands.cs

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,33 @@ namespace Interop.FunctionalTests
1616
{
1717
public static class H2SpecCommands
1818
{
19+
#region chmod
20+
// user permissions
21+
const int S_IRUSR = 0x100;
22+
const int S_IWUSR = 0x80;
23+
const int S_IXUSR = 0x40;
24+
25+
// group permission
26+
const int S_IRGRP = 0x20;
27+
const int S_IWGRP = 0x10;
28+
const int S_IXGRP = 0x8;
29+
30+
// other permissions
31+
const int S_IROTH = 0x4;
32+
const int S_IWOTH = 0x2;
33+
const int S_IXOTH = 0x1;
34+
35+
const int _0755 =
36+
S_IRUSR | S_IXUSR | S_IWUSR
37+
| S_IRGRP | S_IXGRP
38+
| S_IROTH | S_IXOTH;
39+
40+
[DllImport("libc", SetLastError = true)]
41+
private static extern int chmod(string pathname, int mode);
42+
43+
private static int chmod755(string pathname) => chmod(pathname, _0755);
44+
#endregion
45+
1946
private const int TimeoutSeconds = 15;
2047

2148
private static string GetToolLocation()
@@ -27,11 +54,15 @@ private static string GetToolLocation()
2754
}
2855
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
2956
{
30-
return Path.Combine(root, "linux", "h2spec");
57+
var toolPath = Path.Combine(root, "linux", "h2spec");
58+
chmod755(toolPath);
59+
return toolPath;
3160
}
3261
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
3362
{
34-
return Path.Combine(root, "darwin", "h2spec");
63+
var toolPath = Path.Combine(root, "darwin", "h2spec");
64+
chmod755(toolPath);
65+
return toolPath;
3566
}
3667
throw new NotImplementedException("Invalid OS");
3768
}

0 commit comments

Comments
 (0)