Skip to content

Run tests by default and again enable them in UB#19366

Merged
ViktorHofer merged 12 commits intomainfrom
EnableTestsForUBVerticals
Apr 10, 2024
Merged

Run tests by default and again enable them in UB#19366
ViktorHofer merged 12 commits intomainfrom
EnableTestsForUBVerticals

Conversation

@ViktorHofer
Copy link
Member

With be917a9, the unified build tests were moved out of the
VMR build stage into the test stage. As none
of the vertical builds specified runTests: true,
the tests stopped running.

Change the runTests default to true as every single job should run tests.

With be917a9,
the unified build tests were moved out of the
VMR build stage into the test stage. As none
of the vertical builds specified runTests: true,
the tests stopped running.

Change the runTests default to true as every single
job should run tests.
@ViktorHofer ViktorHofer requested a review from akoeplinger April 9, 2024 11:41
@ViktorHofer ViktorHofer enabled auto-merge (squash) April 9, 2024 11:42
@ViktorHofer ViktorHofer requested a review from directhex April 9, 2024 15:06
@directhex
Copy link

New mac failure:

/bin/bash --noprofile --norc /Users/runner/work/_temp/8eb2ad99-e1c7-4130-9242-a57b53c55945.sh
+ dockerVolumeArgs='-v /Users/runner/work/1/vmr:/vmr'
+ sourceOnlyArgs=
+ extraBuildProperties=
+ [[ ! -z iossimulator ]]
+ extraBuildProperties=' /p:TargetOS=iossimulator'
+ [[ ! -z arm64 ]]
+ extraBuildProperties=' /p:TargetOS=iossimulator /p:TargetArchitecture=arm64'
+ [[ False == \T\r\u\e ]]
+ [[ -n '' ]]
+ ./build.sh /bl:artifacts/log/Release/Test.binlog --test /p:TargetOS=iossimulator /p:TargetArchitecture=arm64
/Users/runner/work/_temp/8eb2ad99-e1c7-4130-9242-a57b53c55945.sh: line 26: ./build.sh: No such file or directory

For Docker, we override the working directory to the root of the repo with the -w /vmr flag and associated -v flag. Is the default working directory for the AzDO task not the root of the repo? Do we need an explicit cd?

@directhex
Copy link

directhex commented Apr 9, 2024

Do we need an explicit cd?

Yes. We specify cd $(sourcesPath) in the non-Docker build step.

@ViktorHofer
Copy link
Member Author

Wow @directhex you are a life saver. Thanks for debugging this. The fix was simple :)

@ViktorHofer ViktorHofer requested review from a team as code owners April 9, 2024 18:46

# Only use Docker when a container is specified
if [[ -n "${{ parameters.container }}" ]]; then
docker run --rm $dockerVolumeArgs -w /vmr ${{ parameters.container }} ./build.sh /bl:artifacts/log/Release/Test.binlog --test $sourceOnlyArgs $extraBuildProperties $(additionalBuildArgs)
Copy link
Member

Choose a reason for hiding this comment

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

Consider encapsulating the build command to avoid duplication between container and non-container execution..
The benefit is to ensure equality between the two and improve the maintainability of the code.

Copy link
Member Author

@ViktorHofer ViktorHofer Apr 9, 2024

Choose a reason for hiding this comment

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

Yes, we discussed this in one of the above resolved conversations. We want to get rid of all this and just use YML variables to construct the build commands, outside of script steps. I just filed https://github.com/dotnet/source-build/issues/4307 to track this.

@directhex
Copy link

Failure on Windows. Do we want to just disable tests on Windows & bring that up in a follow-up?

@ViktorHofer ViktorHofer merged commit 52d8d05 into main Apr 10, 2024
@ViktorHofer ViktorHofer deleted the EnableTestsForUBVerticals branch April 10, 2024 06:52
akoeplinger added a commit that referenced this pull request Apr 12, 2024
After #19366 the `runTests` variable is true on Windows too so the step to copy the nuget.config for source-build smoke tests started running there, resulting in an error:
> 'cp' is not recognized as an internal or external command, operable program or batch file.

Skip that step when we're not in doing a source-build.
akoeplinger added a commit that referenced this pull request Apr 12, 2024
This step is no longer needed after #19366.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants