diff options
author | Jarret Shook <jashoo@microsoft.com> | 2018-09-15 08:57:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-15 08:57:22 -0700 |
commit | d47162260d4e202bb06fcc7449fadbfd2955b83b (patch) | |
tree | 0784a1cc13c3e86ebdf29017f633ed3bc8c4cbec /build-test.sh | |
parent | 799508eb77045482d1e2bf13c6696c6b248de0b6 (diff) | |
download | coreclr-d47162260d4e202bb06fcc7449fadbfd2955b83b.tar.gz coreclr-d47162260d4e202bb06fcc7449fadbfd2955b83b.tar.bz2 coreclr-d47162260d4e202bb06fcc7449fadbfd2955b83b.zip |
Layout native test components correctly on unix (#19918)
* Enable native test build and add skipmanaged
* Fix adding native components to test dir
* Clean pri1/pri0 builds with native lib copy
This change disables the build of several tests which have native
dependencies; however, would not build the native dependencies on
unix. At copy time this would result in a build-test failure. In
addition, it fixes, adding executables and dynamic/static libraries
to the test's location.
It has been tested with build-test.sh priority1.
* Fix comment wording
* Remove buildagainstpackage arg
* Fix default clang version
* Clean pri1 run OSX
* Correct test count on unix
* Address typo
* Merge runtest.proj
Diffstat (limited to 'build-test.sh')
-rwxr-xr-x | build-test.sh | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/build-test.sh b/build-test.sh index b7feaa498f..1652f989d8 100755 --- a/build-test.sh +++ b/build-test.sh @@ -257,10 +257,6 @@ build_Tests() build_MSBuild_projects "Restore_Product" "${__ProjectDir}/tests/build.proj" "Restore product binaries (build tests)" "-BatchRestorePackages" fi - if [ -n "$__BuildAgainstPackagesArg" ]; then - build_MSBuild_projects "Tests_GenerateRuntimeLayout" "${__ProjectDir}/tests/runtest.proj" "Restore product binaries (run tests)" "-BinPlaceRef" "-BinPlaceProduct" "-CopyCrossgenToProduct" - fi - if [ $__SkipNative != 1 ]; then build_native_projects "$__BuildArch" "${__NativeTestIntermediatesDir}" @@ -270,24 +266,26 @@ build_Tests() fi fi - echo "Starting the Managed Tests Build..." - - build_MSBuild_projects "Tests_Managed" "$__ProjectDir/tests/build.proj" "Managed tests build (build tests)" "$__up" + if [ $__SkipManaged != 1 ]; then + echo "Starting the Managed Tests Build..." - if [ $? -ne 0 ]; then - echo "${__MsgPrefix}Error: build failed. Refer to the build log files for details (above)" - exit 1 - else - echo "Checking the Managed Tests Build..." - - build_MSBuild_projects "Check_Test_Build" "${__ProjectDir}/tests/runtest.proj" "Check Test Build" "-ExtraParameters:/t:CheckTestBuild" + build_MSBuild_projects "Tests_Managed" "$__ProjectDir/tests/build.proj" "Managed tests build (build tests)" "$__up" if [ $? -ne 0 ]; then - echo "${__MsgPrefix}Error: Check Test Build failed." + echo "${__MsgPrefix}Error: build failed. Refer to the build log files for details (above)" exit 1 - fi + else + echo "Checking the Managed Tests Build..." - echo "Managed tests build success!" + build_MSBuild_projects "Check_Test_Build" "${__ProjectDir}/tests/runtest.proj" "Check Test Build" "-ExtraParameters:/t:CheckTestBuild" + + if [ $? -ne 0 ]; then + echo "${__MsgPrefix}Error: Check Test Build failed." + exit 1 + fi + + echo "Managed tests build success!" + fi fi if [ $__BuildTestWrappers -ne -0 ]; then @@ -525,9 +523,9 @@ usage() echo "verbose - optional argument to enable verbose build output." echo "rebuild - if tests have already been built - rebuild them" echo "skipnative: skip the native tests build" + echo "skipmanaged: skip the managed section of the test build" echo "generatelayoutonly - only pull down dependencies and build coreroot" echo "generatetesthostonly - only pull down dependencies and build coreroot and the CoreFX testhost" - echo "buildagainstpackages - pull down and build using packages." echo "skiprestorepackages - skip package restore" echo "runtests - run tests after building them" echo "ziptests - zips CoreCLR tests & Core_Root for a Helix run" @@ -636,7 +634,8 @@ __MSBCleanBuildArgs= __UseNinja=0 __VerboseBuild=0 __SkipRestore="" -__SkipNative=1 # [REMOVE] Temporarily default to skip native +__SkipNative=0 +__SkipManaged=0 __SkipConfigure=0 __SkipGenerateVersion=0 __ConfigureOnly=0 @@ -645,7 +644,6 @@ __ClangMajorVersion=0 __ClangMinorVersion=0 __NuGetPath="$__PackagesDir/NuGet.exe" __HostDistroRid="" -__BuildAgainstPackagesArg= __SkipRestorePackages=0 __DistroRid="" __cmakeargs="" @@ -786,9 +784,9 @@ while :; do __SkipNative=1 ;; - # [REMOVE] Enable native build - the temporary default is to skip native - --skipnative) - __SkipNative=0 + skipmanaged|-skipmanaged) + __SkipManaged=1 + __BuildTestWrappers=0 ;; ziptests) @@ -801,9 +799,6 @@ while :; do generatetesthostonly) __GenerateTestHostOnly=1 ;; - buildagainstpackages) - __BuildAgainstPackagesArg=1 - ;; skiprestorepackages) __SkipRestorePackages=1 ;; @@ -862,12 +857,12 @@ fi # Set default clang version if [[ $__ClangMajorVersion == 0 && $__ClangMinorVersion == 0 ]]; then - if [ $__CrossBuild == 1 ]; then - __ClangMajorVersion=3 - __ClangMinorVersion=6 + if [[ "$__BuildArch" == "arm" || "$__BuildArch" == "armel" ]]; then + __ClangMajorVersion=5 + __ClangMinorVersion=0 else __ClangMajorVersion=3 - __ClangMinorVersion=5 + __ClangMinorVersion=9 fi fi |