summaryrefslogtreecommitdiff
path: root/build-test.sh
diff options
context:
space:
mode:
authorAndon Andonov <anandono@microsoft.com>2018-07-11 21:39:57 -0700
committerGitHub <noreply@github.com>2018-07-11 21:39:57 -0700
commite3ccef1c21978fa682bc76fd7626dd7ae9871cc0 (patch)
treeefca47513fe90cf75baed068a6779c1763957390 /build-test.sh
parenta03b08ab38186db8bb30a412bc73165810140119 (diff)
downloadcoreclr-e3ccef1c21978fa682bc76fd7626dd7ae9871cc0.tar.gz
coreclr-e3ccef1c21978fa682bc76fd7626dd7ae9871cc0.tar.bz2
coreclr-e3ccef1c21978fa682bc76fd7626dd7ae9871cc0.zip
CoreFX CI Unix (#18753)
* Full Unix test support * Remove Test helper build from build-test Add msg prefix Change if condition * Change Linux URL * Syntax error * Fix Merge Conflict * Address PR Feedback * Remove duplicate generate_testhost call * Address PR comments * Clean up exclusion list * Disable Client_ReadWriteCancelledToken_Throws_OperationCanceledException * Disable all flavors of CancelledToken_Throws_OperationCanceledException * Disable X509StoreTests.Constructor_DefaultStoreName - flaky on OSX * Update documentation with Linux instructions and workflow * Disable EventWaitHandleTests.Ctor_InvalidMode - failing on OSX * Disable Server_ReadWriteCancelledToken_Throws_OperationCanceledException
Diffstat (limited to 'build-test.sh')
-rwxr-xr-xbuild-test.sh47
1 files changed, 37 insertions, 10 deletions
diff --git a/build-test.sh b/build-test.sh
index b5badd09ab..ab73f979f7 100755
--- a/build-test.sh
+++ b/build-test.sh
@@ -187,8 +187,24 @@ generate_layout()
if [ ! -f "${__BuildToolsDir}/Microsoft.CSharp.targets" ]; then
ln -s "${__BuildToolsDir}/Microsoft.CSharp.Targets" "${__BuildToolsDir}/Microsoft.CSharp.targets"
fi
+
}
+generate_testhost()
+{
+ export TEST_HOST=$xUnitTestBinBase/testhost
+
+ if [ -d "${TEST_HOST}" ]; then
+ rm -rf $TEST_HOST
+ fi
+
+ echo "${__MsgPrefix}Creating test overlay..."
+ mkdir -p $TEST_HOST
+
+ build_Tests_internal "Tests_Generate_TestHost" "${__ProjectDir}/tests/runtest.proj" "-testHost" "Creating test host"
+}
+
+
build_Tests()
{
__TestDir=$__ProjectDir/tests
@@ -510,6 +526,7 @@ __RunTests=0
__RebuildTests=0
__BuildTestWrappers=0
__GenerateLayoutOnly=
+__GenerateTestHostOnly=
__priority1=
CORE_ROOT=
@@ -641,11 +658,9 @@ while :; do
generatelayoutonly)
__GenerateLayoutOnly=1
;;
-
generatetesthostonly)
- exit 0
+ __GenerateTestHostOnly=1
;;
-
buildagainstpackages)
__BuildAgainstPackagesArg=1
;;
@@ -745,15 +760,22 @@ fi
# Specify path to be set for CMAKE_INSTALL_PREFIX.
# This is where all built CoreClr libraries will copied to.
export __CMakeBinDir="$__BinDir"
+if [ [ ! -d "$__BinDir" ] || [ ! -d "$__BinDir/bin" ] ]; then
+ if [ [ -z "$__GenerateLayoutOnly" ] && [ -z "$__GenerateTestHostOnly" ] ]; then
-if [ ! -d "$__BinDir" ] || [ ! -d "$__BinDir/bin" ]; then
-
- echo "Cannot find build directory for the CoreCLR Product or native tests."
- echo "Please make sure CoreCLR and native tests are built before building managed tests."
- echo "Example use: './build.sh $__BuildArch $__BuildType' without -skiptests switch"
+ echo "Cannot find build directory for the CoreCLR native tests."
+ echo "Please make sure native tests are built before building managed tests."
+ echo "Example use: './build.sh $__BuildArch $__BuildType' without -skiptests switch"
+ else
+ echo "Cannot find build directory for the CoreCLR Product."
+ echo "Please make sure CoreCLR and native tests are built before building managed tests."
+ echo "Example use: './build.sh $__BuildArch $__BuildType' "
+ fi
exit 1
fi
+
+
# Configure environment if we are doing a cross compile.
if [ $__CrossBuild == 1 ]; then
export CROSSCOMPILE=1
@@ -770,12 +792,17 @@ initTargetDistroRid
__CoreClrVersion=1.1.0
__sharedFxDir=$__BuildToolsDir/dotnetcli/shared/Microsoft.NETCore.App/$__CoreClrVersion/
-echo "Building Tests..."
-if [ -z "$__GenerateLayoutOnly" ]; then
+if [[ (-z "$__GenerateLayoutOnly") && (-z "$__GenerateTestHostOnly") ]]; then
+ echo "Building Tests..."
build_Tests
else
+ echo "Generating test layout..."
generate_layout
+ if [ ! -z "$__GenerateTestHostOnly" ]; then
+ echo "Generating test host..."
+ generate_testhost
+ fi
fi
if [ $? -ne 0 ]; then