Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

CoreFX CI Unix #18753

Merged
merged 17 commits into from
Jul 12, 2018
Merged

CoreFX CI Unix #18753

merged 17 commits into from
Jul 12, 2018

Conversation

A-And
Copy link

@A-And A-And commented Jul 2, 2018

Unix Version of #18365
The work left to do on this is to add currently failing tests.

cc @RussKeldorph @sergiy-k

@A-And A-And requested review from jashook and BruceForstall July 2, 2018 20:39
"methods": [
{
"name": "System.Reflection.Context.Tests.CustomPropertyInfoTests.GetCustomAttributesDataTest",
"reason": "System.PlatformNotSupportedException System.PlatformNotSupportedException : Customized reflection contexts are only supported on .NET Framework."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exception means that we are using wrong corefx bits (.NET Framework bits instead of netcoreapp30 bits) when running the tests. It would be nice to fix the problem with the wrong corefx bits - there seems to be a lot of the test exclusion because of this underlying problem.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix the failures here - #18760 .

@jashook
Copy link

jashook commented Jul 2, 2018

These changes conflict with #18695 @sbomer heads up.

@A-And
Copy link
Author

A-And commented Jul 2, 2018

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please

build-test.sh Outdated
generate_layout
if [ "$__GenerateTestHostOnly" ]; then
echo "Generating test host..."
generate_testhost
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this: generate_layout already will have invoked generate_testhost. For generatetesthostonly is it required to also first build the layout? If building the layout also generates the testhost, why do we even need the generatetesthostonly option?

I'm no bash expert, but should if [ "$__GenerateTestHostOnly" ]; be if [ -n "$__GenerateTestHostOnly" ];?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch - thank you! The generate_testhost in generate_layout was unnecessary.
The test host (i.e. the CoreFX testing framework) has a dependency on generating the test layout (which creates CORE_ROOT) I've kept the generatetesthostonly in order to be able to generate just CORE_ROOT if necessary.

</PropertyGroup>

<PropertyGroup Condition="'$(OSGroup)'!='Windows_NT'">
<HostFxrFileName>libhostfxr</HostFxrFileName>
<HostFxrFileExtension Condition="'$(OSGroup)' == 'Linux' Or '$(OSGroup)' == 'FreeBSD'">so</HostFxrFileExtension>
<HostFxrFileExtension Condition="$(OSGroup) =='OSX'">dylib</HostFxrFileExtension>
<HostPolicyFileName>libhostpolicy</HostPolicyFileName>
<HostPolicyExtension Condition="'$(OSGroup)' == 'Linux' Or '$(OSGroup)' == 'FreeBSD'">so</HostPolicyExtension>
<HostPolicyExtension Condition="$(OSGroup) =='OSX'">dylib</HostPolicyExtension>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the syntax here, but instead of duplicating logic, couldn't it just copy the HostFxrFileExtension value? Something like:

<HostPolicyExtension>$(HostFxrFileExtension)</HostPolicyExtension>

tests/runtest.sh Outdated
echo 'CoreFX Test Options '
echo ' --corefxtests : Runs CoreFX tests'
echo ' --corefxtestsall : Runs all available CoreFX tests'
echo ' --corefxtestlist : Runs the CoreFX tests specified in the passed list'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --corefxtestlist option should show how the "list" is passed. E.g., --corefxtestlist=<list>?

local coreFXTestRemoteURL=$(<${coreClrSrcTestDir}/CoreFX/CoreFXTestListURL_OSX.txt)
local coreFXTestExclusionDef=nonosxtests
;;
# Default to Linux
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the default is Linux, maybe you can just delete the (duplicative) Linux case, above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@A-And A-And force-pushed the FXCIUnix branch 2 times, most recently from c56ce54 to ad40475 Compare July 3, 2018 21:08
@BruceForstall
Copy link
Member

If you plan to merge this, please remove the [WIP] tag from the issue title.

Copy link

@jashook jashook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm minus some nits. Still concerned about the merge between this and #18695


if [ -z $coreClrBinDir ]; then
local coreClrBinDir=${coreClrSrc}/bin
export __CoreFXTestDir=${coreClrSrc}/bin/tests/CoreFX
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have two possible locations for this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reducing verbosity. Instead of running runtest.sh with both --coreclr-src and --coreclr-bin we infer the bin directory.
If someone were to supply both it would change the output directory of the helper projects and logs.

tests/runtest.sh Outdated
local coreFXLogDir=${coreClrBinDir}/Logs/CoreFX/
local coreFXTestExecutableArgs="--notrait category=nonnetcoreapptests --notrait category=${coreFXTestExclusionDef} --notrait category=failing --notrait category=IgnoreForCI --notrait category=OuterLoop --notrait Benchmark=true"

# What happens on distros where msbuild is not supported?
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this comment, unsupported targets should get a warning earlier in the file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right - this will be caught (or overriden) in build-test before this is even called.

tests/runtest.sh Outdated
buildCommand="${dotnetExe} msbuild ${coreFXTestSetupUtility} /p:OutputPath=${coreFXTestSetupUtilityOutputPath} /p:Platform=${_arch} /p:Configuration=Release"
echo $buildCommand
# Invoke MSBuild
eval $buildCommand
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a fan of the eval $buildCommand, I would prefer to invoke the command and pass the extra args as a variable.

Something like:

"${dotnetExe}" $buildArgs

tests/runtest.sh Outdated
# Invoke MSBuild
eval $buildCommand

chmod +x $dotnetExe
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be before the eval?

tests/runtest.sh Outdated

runCommand="${dotnetExe} ${coreFXTestSetupUtilityOutputPath}/${coreFXTestSetupUtilityName}.dll --clean --outputDirectory ${coreFXTestBinariesOutputPath} --testListJsonPath ${CoreFXTestList} ${coreFXRunCommand} --dotnetPath ${testHostDir}/dotnet --testUrl ${coreFXTestRemoteURL} --executable ${coreFXTestExecutable} --log ${coreFXLogDir} ${coreFXTestExecutableArgs}"
echo $runCommand
eval $runCommand
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment about eval

@A-And A-And changed the title [WIP] CoreFX CI Unix CoreFX CI Unix Jul 4, 2018
@A-And
Copy link
Author

A-And commented Jul 9, 2018

@dotnet-bot test this please

@A-And
Copy link
Author

A-And commented Jul 10, 2018

@dotnet-bot test OSX10.12 x64 Checked CoreFX Tests please

@A-And
Copy link
Author

A-And commented Jul 11, 2018

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please
@dotnet-bot test OSX10.12 x64 Checked CoreFX Tests please

@A-And
Copy link
Author

A-And commented Jul 12, 2018

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please

@A-And
Copy link
Author

A-And commented Jul 12, 2018

@dotnet-bot test OSX10.12 x64 Checked CoreFX Tests please

@A-And A-And merged commit e3ccef1 into dotnet:master Jul 12, 2018
@A-And A-And deleted the FXCIUnix branch July 12, 2018 04:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants