summaryrefslogtreecommitdiff
path: root/build-test.cmd
AgeCommit message (Collapse)AuthorFilesLines
2019-06-14abort build-tests if failed to restore stress dependencies (#25140)Sergey Andreenko1-0/+4
* abort build-tests if failed to restore stress dependencies * Fix arm condition. * Add arm64 condition. * Skip runtime dependencies for arm32/arm64.
2019-06-06Fix initializing BuildTools when the Platform environment variable is set ↵Elinor Fung1-0/+3
(#24998) * Make build-test.cmd exit if init-tools.cmd fails * Clear Platform variable before initializing BuildTools
2019-05-16Add Managed->Native tests for our WinRT primitives (#23529)Jeremy Koritzinsky1-1/+2
* First pass generating the contracts for the WinRT tests. Managed ones are manually written, Native are generated via C++/WinRT. * Don't overwrite the public implementation files when we run cppwinrt * Don't output a MIDL-processed header. * Add default constructor for BindingViewModel. * Partial implementation of most of the native winrt component. * Finish implementation of native winrt component. * Get native component building correctly (cppwinrt doesn't include wrappers for the "Windows::UI::Xaml::Interop::IBindable*" collection types. * Add WinRT primitive marshalling tests. * Add testing for projected types used for binding. * Add license headers to native files. * Disable WinRT tests on non-WinRT platforms (detection copied from CoreFX). * Use WINDOWS_SDK_VERSION variable in all locations. * Use Windows SDK version determined by CMake in WinRT build. * Resolve WinMDs via globs so the build can roll between different Windows SDK versions that have required APIs seamlessly. * Add logging of cppwinrt version. * Try to construct path to cppwinrt when finding it * Just directly construct the cppwinrt path. * Remove -prefix flag from cppwinrt invocation * PR feedback. * Fix syntax in BindableVectorWrapper. * Disable winrt binding test on Nano Server. * Add enum testing. Clean up WinRT tests to hopefully build on CI (or at least fail at a later point). * Add some more logging to try to determine why an older SDK version is being picked. * Try to define CMAKE_SYSTEM_VERSION and see if that selects the correct SDK version (it seems to work on the build.cmd script) * Clean up WinRT CMake now that it builds on AzDO CI. * Disable WinRT binding test on pre-Win10V1809 systems.
2019-05-10Properly set the nuget cache for the repo (#24505)Aaron Robinson1-1/+1
* Properly set the nuget cache for the repo * Change coreclr NuGet package cache from "./packages" to "./.packages"
2019-04-15Fix precompiling CoreRoot overlay with crossgen for Windows arm/arm64 (#23946)Sergiy Kuryata1-3/+7
2019-04-11Enable default Ready2Run testing in pull requests. Workaround an issue with ↵Egor Chesakov1-0/+5
custom xunit.console.dll runner. (#23848)
2019-03-01Use arcade's version of dotnet to build (#22755)Steve MacLean1-1/+1
* Use arcade dotnet * Add cmake_msbuild.cmd Move msbuild.cmd to cmake_msbuild.bat Document intent that this file is only used to resolve Windows cmake dependency on desktop msbuild.exe Remove one instance of msbuild.cmd * Fix inittools.cmd * Remove spurious setup_vs_tools.cmd calls
2019-02-28Re-partition MSBuild test groups (#22885)Egor Chesakov1-6/+5
This changes a tests partitioning scheme of coreclr tests in several different ways: 1. Make the test groups are of equal (to some extent) sizes keeping the number of tests in one group less than 1000; 2. As a resulf of 1) this increases a number of groups needed for Pri0 tests to 3 and decreases a number of groups for Pri1 tests to 10; 3. This also changes a way of tests partitioning scheme is defined - instead of explicitly specifying MSBuild Include-patterns this defines a boundaries between test groups in a form of _StartsWith ItemGroup. Then I use StringComparer.Ordinal to pick tests that belong to a particular group.
2019-02-27Remove BuildTestsAgainstPackages logicRuss Keldorph1-54/+5
No longer necessary without PipeBuild logic
2019-02-25Remove buildpipelines (#22835)Steve MacLean1-39/+1
* Remove old buildpipeline * Remove obsolete publish-packages * Remove obsolete helix scripts
2019-02-15Manually update the dependencies.props and move S.P.Corelib to use ↵Tanner Gooding1-19/+14
LangVersion=8.0 (#22452) * Update BuildTools to preview1-03713-01 (master) * Updating CoreCLR to use LangVersion=8.0 * Moving the Windows scripts to default to `dotnet msbuild` for managed components * Setting UseSharedCompilation=true * Changing some additional callsites that were using msbuild to use dotnet msbuild * Revert packages.builds to use Desktop msbuild on Windows * Fixing runtest.cmd to always set DotNetCli
2019-02-11Support building with VS2019 Preview (#22525)Tanner Gooding1-6/+6
* Support building with VS2019 Preview * Fixing gen-buildsys-win to only set the architecture for the VS generator * Refactoring Dev11/147911/fpcw.cpp so that it compiles under VS2019 * Removing the remaining traces of VS2015 build support
2019-02-04Configure MSBuild debug path and save any logsBruce Forstall1-0/+5
We have had many problems in the CI with MSBuild failing, and not capturing the failure logs. See https://github.com/dotnet/coreclr/issues/20236. So, for all msbuild invocations, set MSBUILDDEBUGPATH to a new, distinguished, subdirectory of the bin\Logs directory, named "MsbuildDebugLogs". Change the CI to upload any log files found there.
2019-01-30Remove run.exe and config.json (#21608)Sven Boemer1-25/+52
This moves us one step away from buildtools and towards arcade. This replaces run.sh and run.cmd (and all invocations) with "dotnet.sh msbuild" and "msbuild.cmd". - I'm using these wrapper scripts for now instead of those in eng/common in order to retain the very helpful "Running <command>" output in the build logs. - I'm using msbuild.cmd instead of dotnet.sh to match the current behavior that uses desktop msbuild on windows, instead of dotnet. All of the arguments that used to be implicitly generated by run.exe and config.json are now explicit, resulting in longer (but easier to copy+paste) commands. Some of these arguments are likely unnecessary, but in this change my goal is just to match the run.exe behavior. Later, I would like to go through and clean up parameters that don't need to be passed in every invocation. I might also consider moving more of the common arguments out into variables in a later change. Some of the wrapper scripts now have limited support for parsing "-Argument=Value" style parameters, to support our existing buildpipeline infrastructure, since I thought this was easier to test than changing our buildpipeline definitions. We can remove that parsing logic once we stop using buildpipeline (which has happened at this point). Some subtle parts of the change: * Add msbuild.cmd This simulates the behavior of Tools\msbuild.cmd, which calls desktop msbuild. * Fix BuildOS processing in package build and publish Previously, config.json had its own processing that would set OSName. Instead, we now pass it in explicitly where it's needed (building packages), or not at all (publishing them). * Handle "=" in publish-packages.cmd and other scripts This seems necessary to properly handle the azure access token * Set __BuildOS in PublishPackages Required for cases where the build OS isn't detected during the build such as freebsd. * Use dotnet msbuild in runtest.py This prevents us from having to deal with different quote escape behavior on windows and linux. Previously, arguments like fileloggerparameters and the logger were given quotes to escape semicolons in the argument. On unix, this prevented the argument from being split up by bash. On windows, it seems that the run.cmd/run.exe tools would prevent the extra quotes from being passed to msbuild.exe (desktop msbuild would choke on the quotes if they were passed along). Unlike desktop msbuild, dotnet msbuild is able to parse the quoted strings, so we simply psas the quoted arguments directly to it on windows. We may be able to do the same on unix. * Fix build-test.sh problem with BuildOS When copying native files during the unix test build, we rely on __BuildOS being set. Fixing the import order and always setting __BuildOS fixes this. We should eventually fix the inconsistent use of BuildOS vs __BuildOS.
2018-12-06Work around apparent bug in CMD's FOR /LRuss Keldorph1-1/+7
Hopefully this will mean that official build failures during the actual build phase will correctly be reported as failures. There could be other places that need to change, but this is all we know of right now. Fixes #18788 (at least part of it)
2018-11-16Eliminate CMAKE dependency when not required (#21040)Dan Moseley1-2/+2
2018-11-08Add azure-pipelines build and test definitions (#20840)Sven Boemer1-1/+1
This adds an azure pipeline definition with a matrix of product and test builds, using helix to run tests. The intention is that this definition will eventually be used for both our official build and CI testing. There is one build job for each OS/platform/arch, and one test job for each OS/platform/arch/priority/R2Rflag. The test job builds tests and then submits them to helix, passing along a number of test run modes. One helix test job will be created for each OS/platform/arch/priority/R2Rflag/helixtargetqueue/testscenario. There is a lot of work left to be done to get this up to parity with our official builds and CI, which I've tried to call out in comments.
2018-09-12Address msbuild issues with cross compiled tests in helix (#19901)Aaron Robinson1-12/+13
* Address msbuild issues with cross compiled tests in helix * Fix test warning about duplicate types
2018-09-10Basic implementation for testing of COM activation of a .NET class (#19760)Aaron Robinson1-2/+4
* Rough outline of managed implementation for COM activation in SPCL * Add property for finding interop common Add property to exclude default assertion file Display exe ExeLaunchProgram class is going to launch * Add a native client for the NETServer Consume the ExeLauncherProgram.cs file as a wrapper for the native test * Update COM Server contracts to use 'int' instead of 'long' * Complete symmetric testing coverage for .NET server and native client. * Block EXE launch from running on non-Windows machines * Disable COM testing in helix since it has issues on Windows Nano and there is no way to determine that is the platform. * Update tests based on CLSID mapping manifest approach.
2018-08-31Fix build-test.sh wrapper build (#19779)Jarret Shook1-0/+2
* Fix build-test.sh wrapper build In addition this change creates a json file with the build info so that the wrapper build may be skipped if it was built on the same os/arch/buildtype. * Address pr feedback
2018-08-10Merge pull request #19387 from dotnetrt/parallel-test-buildBruce Forstall1-1/+1
Reenable parallel msbuild execution - 2x faster test build
2018-08-09Reenable parallel msbuild execution - 2x faster test buildJacek Blaszczynski1-1/+1
2018-08-09Fix `--` application to managed tests build comamnd-lineBruce Forstall1-1/+2
2018-08-08Restore handling of __PassThroughArg for `--`Bruce Forstall1-6/+8
2018-08-07Use dotnet MSBuild for tests (#19324)Aaron Robinson1-4/+6
* Revert "Revert "Build managed tests with dotnet (#19254)"" * Reenable MSBuild support through dotnet instead of global MSBuild
2018-08-07Add basic check that the correct number of tests is built (#19290)Bruce Forstall1-0/+9
Fixes #19286
2018-08-05Clean up build.cmd/build-test.cmd/runtest.cmdBruce Forstall1-126/+179
Various minor cleanups: 1. Use the same naming/style for all three. 2. Make the style consistent throughout each. E.g., consistent indents, capitalization. 3. Add more consistent output, including the prefix tag used everywhere. 4. build.cmd: only build cross components if native build is enabled. 5. Use new __Logging variable to consolidate all logging arguments, to reduce large (unexpanded) command line lengths.
2018-08-03Revert "Build managed tests with dotnet (#19254)"Bruce Forstall1-6/+3
This reverts commit 101baee1010eaad47cd7afd1e041a7f422aefa78.
2018-08-03Build managed tests with dotnet (#19254)Chris Sienkiewicz1-3/+6
* Change managed projects to build with dotnet msbuild, rather than desktop msbuild * Build sdk tests as AnyCPU * Correct args passed through to dotnet for tests * Remove extra backslash from baseIntermediateOutputPath that was causing individual test exe builds to fail * Fix double import warning for sdk projects * Add default params from config.json to build-test dotnet invocations * Fix priority argument passing from the command line for tests
2018-08-01Enable ARM64 builds using release product toolsBruce Forstall1-57/+12
Remove support for specifying the toolset directory for arm64, which was used to point to an internal toolset. Building for arm64 now works just like the other platforms, e.g. invoke `build arm64`. The requirements: . Visual Studio 2017 Update 4 or later, with ARM64 toolset installed . Windows SDK 10.0.17134.0 or later . CMake 3.10 or later
2018-08-01Revert "Build managed tests with dotnet (#19230)"Bruce Forstall1-2/+2
This reverts commit 763142a210d858289d30365dd1d4f2772e48f30d.
2018-08-01Build managed tests with dotnet (#19230)Chris Sienkiewicz1-2/+2
* Change managed projects to build with dotnet msbuild, rather than desktop msbuild * Build sdk tests as AnyCPU * Correct args passed through to dotnet for tests * Remove extra backslash from baseIntermediateOutputPath that was causing individual test exe builds to fail * Fix double import warning for sdk projects * Add default params from config.json to build-test dotnet invocations
2018-07-26Merge pull request #19153 from adityamandaleeka/fix_buildtest_helpAditya Mandaleeka1-1/+1
Fix batch syntax error in help text
2018-07-26Fix syntax error in help text.Aditya Mandaleeka1-1/+1
2018-07-25Sdk test projects (#19044)Chris Sienkiewicz1-1/+1
Change the associated targets and props files in the test directory to allow the test csproj's to be built as SDK style projects alongside traditional style projects. Remove CodeTaskFactory: - Allows the projects to be built using the core version of msbuild/dotnet build - Converted to using msbuild property expansion instead Add directory.build.{props,targets}: - Currently we just import the dirs.props and targets, but means SDK style projects don't need to explicitly include these files - We probably want to move all projects over to using these in the future, but this keeps the changes smaller for now Specific code for SDK projects: - There are a several changes required to build an SDK project. This change guards them behind conditionals so that only the new style projects see them. When we get to the point that there are only new projects, we can remove the guards (probably at the same time as ditching the dir.props) Reordered build targets: - Because SDK projects implicitly import the build targets, we can no longer re-define the build targets unconditionally knowing they will likely be overwritten. - Instead we move the overwritten targets to separate files, and include these conditionally based on properties. In this way there is always a build defined for SDK projects, which can then be overwritten to do nothing as needed.
2018-07-19Build xunit wrappers the same way on windows and unix (#18695)Sven Boemer1-10/+26
* Initial change to allow build wrappers and runtest.py * Build xunit wrappers on unix The generated wrapper needs to target netcoreapp on unix. I had to exclude assets from the xunit package and introduce a dependency on the private corefx bits, to resolve a dependency conflict in which the generated wrapper was depending on an older System.Runtime.dll than the helper library. I also disabled binclash logging, because the wrapper build binplaces the helper library to the same location multiple times. I couldn't find a simple way to disable binclash logging for the wrapper build only, since that requires passing an empty switch to run.exe, and bash word splitting makes this nontrivial from build-test. * Correctly generate TestEnv xplat Note that this will still require changes to the test wrapper to actually source the TestEnv on unix * Build xunit wrappers using SDK * Target netcoreapp2.0 in xunit wrappers This way, the wrappers can build even if the 2.1 SDK isn't installed on the machine. * Restore to packages directory for xunit wrappers * Move common properties out to dir.common.props When building wrappers using the SDK, we need some basic properties (like the build os/arch/config, and the output directories) to be set. I factored out properties used by both the old test build and the new SDK-project test build. At first I tried using Directory.Build.props (which is automatically imported by the SDK), but our test build already imports SDK targets in various places, so this was resulting in duplicate imports. Instead, I used dir.common.props, and made the imports explicit. * Remove desktop-specific test wrapper csproj * Pass build os/arch/type and logsdir to msbuild from runtest.py * Remove xunit wrapper helper library from traversal build * Fix parameter passing in build-test.sh Use bash arrays to pass parameters for the build command. This makes it possible to pass arguments with spaces to build_Tests_internal. We use this to disable binclashlogging selectively (for the xunit wrapper build only). * Clean up factored .props files * Undo runtest.sh changes * Use latest xunit console runner everywhere * Remove extra StaticDependency on xunit.runner.console * Eliminate tests/src/dir.common.props, and rename dir.sdkbuild.props tests/src/dir.common.props was only used for the desktop-specific xunit wrapper helper library. There's no need for it any more, so its properties have been moved into tests/src/dir.props. dir.sdkbuild.props has been renamed to dir.common.props, since it contains properties used by SDK projects and buildtools projects. This change also re-enables the test build. * Reintroduce dir.sdkbuild.props as a place for SDK-only props With this, some properties shared by SDK projects can go in a global location. The TargetFramework is shared by all SDK projects in the test tree. This change also uses a property for the xunit package directory that contains the xunit.console.dll we copy to core_root. * Add xml namespace to dir.common.props This fixes a failure in the windows build. * Satisfy xunit analyzer * Satisfy xunit analyzer again * Use SDK msbuild to build wrappers On windows, the use of run.exe, config.json, and msbuild.cmd uses msbuild.exe on the path. This change will build wrappers using the local SDK via "dotnet msbuild", bypassing run.exe. Run.exe will go away entirely with the move from buildtools to arcade, so other build invocatios should follow suit. * Remove Microsoft.CSharp.Core.targets workaround UseBuildTools used to be true all the time. Now that we are building wrappers on core, UseBuildTools becomes false. However, the rest of the runtest.proj expects to build using buildtools, so we keep UseBuildTools true until we switch to arcade. The CSharpCoreTargetsPath was imported when running on core only. This used to happen only on unix, but now it also happens when building runtest.proj for the xunit wrappers on windows. On unix, this targets file was a symlink to itself to work around some buildtools logic that expected the file to exist. This workaround no longer appears necessary, and on windows, this was never used in the first place, so this change removes it. * Remove UseRoslynCompilers prop and unify roslyn import UseRoslynCompilers was introduced in buildtools by https://github.com/dotnet/buildtools/pull/947, with different behaviors on windows/unix. It was removed by https://github.com/dotnet/buildtools/pull/1974, so we can unify our roslyn imports now. * Don't copy xunit dlls to corefx test host The corefx tests run on specific versions of xunit dlls, defined in CoreFX.depproj. We want to use these versions in the test host, not those in CORE_ROOT, so exclude these from being copied to the test host directory. This fixes the failing corefx tests. * Don't pass run.exe arguments through build-test.cmd in test pipeline These arguments get passed along to the xunit wrapper build as unprocessed build args. They need to work for "dotnet msbuild" (used for the wrapper build) as well as for run.exe. * Fix parameter passing of priority arg in build-test.cmd UnprocessedBuildArgs should contain arguments in the format expected by msbuild, not by run.exe. * Fix parameter passing of unprocessed args in build-test.cmd The "--" syntax is used by run.exe to pass everything following to msbuild directly. It should not be a part of unprocessed args. * Pass TargetsWindowsArg to wrapper build in build-test.cmd Helix builds tests on windows and runs them on unix using the xunit wrappers. When cross-building the wrappers like this, TargetsWindows is set to false by the test build pipeline. This variable ensures that the wrapper uses correct directory separators when invoking the test .sh file. * Pass BuildTestsAgainstPackages arg to exclude unix tests Helix builds xunit wrappers on windows, and runs them on unix. The BuildTestsAgainstPackages should currently be set to true in the windows wrapper build to properly filter the .cmd files based on exclusions in issues.targets.
2018-07-02Move RuntimeIDArg initialization (#18747)Andon Andonov1-13/+13
2018-06-27Windows CoreFX CI (#18365)Andon Andonov1-24/+61
* Add test list CL switch * End-To-End Test Run on Windows * Cleanup * MAX_PATH Workaround * Set Execution directory for CoreFX tests * Add All CoreFX PR Tests * Add test dependencies * Add extra dependencies * Add parallel test execution * Disable OuterLoop tests and System.Data.SqlClient.* tests * Initialize maximum degree of parallelization to Environment.ProcessCount * Remove unnecessary cli option * Update Dependencies * Add "enabled" property to tests * Remove exclusions due to TestUtilities mismatch * Add capability to run all tests for running Helix test lists directly * Refactor build script to build testhost when skipping managed tests * Disable failing System.Threading.Tests.EventWaitHandleTests.Ctor_InvalidMode * Add switch to skip native test build * Add testing documentation * Don't run tests marked as "disabled" when running all available tests * Add switch to build only testhost and remove Core_Root_Stage * Clean up TopN.CoreFX.Windows.issues.json * Refactor build-test.cmd * PR feedback - build pipeline and documentation * PR Feedback - Test Helper headers and comments * Fix buildtesthost option for only building CoreFX test dependencies * Disable intermittently failing test DrawBezier_PointFs
2018-03-23Improve Windows test build performance by building projects in groupsJacek Blaszczynski1-11/+42
2018-03-06Remove vs2015 build dependenciesjashook1-34/+5
2017-11-26Fix Powershell error (#15217)Bruce Forstall1-2/+2
2017-11-22Fix all powershell invocations in scripts, CI code and tests to include ↵Jacek Blaszczynski1-2/+2
-NoProfile (#15164) Code execution in several scripts and tests can be affected by powershell profile execution at startup. Adding -NoProfile option to all powershell invocations which may be affected by execution of profile startup code.
2017-10-30Merge pull request #14712 from BruceForstall/VS2017Arm64Bruce Forstall1-7/+9
Allow building arm64 using VS2017 tools
2017-10-27Address code review feedbackJacek Blaszczynski1-4/+2
2017-10-26Allow building arm64 using VS2017 toolsBruce Forstall1-7/+9
VS2017 now includes ARM64 compilers. Change the build scripts so that the normal VC tools path is used for the builds for ARM64. However, if -toolset_dir is passed, then use the specified tools, as before.
2017-10-24Cleanup VsDevCmd.bat usage and improve build system messages to ease diagnosticsJacek Blaszczynski1-8/+11
2017-10-03Update Buildtools and Roslyn (#14228)Jose Perez Rodriguez1-0/+17
* Update Buildtools and Roslyn * Fixing importing of the roslyn files on msbuild 14.0 * Correctly looking for the latest VS Installation
2017-08-30Remove -sequential build-flag (#13658)Omair Majid1-2/+0
The flag is not implemented anywhere and is completely ignored. Remove it form various help notices too. Fixes #12035
2017-08-25Scope environment variable settingBruce Forstall1-17/+26
The product and test build scripts invoke Visual Studio environment setting scripts several times during the build process. If doing a full cross architecture build including test build, it's as many as five times. These environment changes are cumulative. For the PATH variable, in particular, they can lead to a failure by exceeding the variable length limit. This seems to have been exacerbated by VS2017, which has very long paths, and for which many things are added to the PATH. Fix this by adding "setlocal" / "endlocal" around various sections of the scripts, so that the multiple calls to the environment script are not cumulative. (There is still some cumulative environment setting, as build.cmd calls VsDevCmd.bat, then if tests are being built, calls build-test.cmd, which also calls VsDevCmd.bat, and then possibly in addition calls vcvarsall.bat.) In addition, I simplified the code that sets up the msbuild logging parameters, so it is more readable, regular, and doesn't have so much repeated text.
2017-08-11Fix bug where whitespace breaks arg proccessing (#13320)Victor "Nate" Graf1-2/+5
* Fix bug where whitespace breaks arg proccessing * Fix whitespace proccessing bug in buil-text.cmd