Skip to content

Commit 4852d19

Browse files
Updating files touched by Mariana in CoreFx PR #10231
* Each of these files was either edited or added in Mariana's PR. * I synced each of these files to what is currently in CoreFx meaning that they will include any changes made since Mariana's PR. * The next commit will update all other shared scripts 'not' touched by Mariana's PR to make sure we don't have any partial changes from other people. * Mariana's PR touched many other Native files in CoreFx, WCF has none of these. * Mariana's PR also touched netci.groovy, Jason Pang owns the WCF version of this file so I have not touched it in this commit.
1 parent 9a2dd72 commit 4852d19

17 files changed

+740
-1271
lines changed

build-managed.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@call %~dp0run.cmd build-managed %*
2+
@exit /b %ERRORLEVEL%

build-managed.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
3+
usage()
4+
{
5+
echo "Usage: $0 [platform] [useservergc]"
6+
echo
7+
echo "platform can be: FreeBSD, Linux, NetBSD, OSX, Windows."
8+
echo "useservergc - Switch used by configure the hosted coreclr instance when executing tests."
9+
echo
10+
}
11+
12+
13+
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
14+
15+
__UnprocessedBuildArgs=
16+
__TestNugetRuntimeId=-distroRid
17+
__BuildOS=-os
18+
__TargetOS=-target-os
19+
__ServerGC=0
20+
21+
while :; do
22+
if [ $# -le 0 ]; then
23+
break
24+
fi
25+
26+
lowerI="$(echo $1 | awk '{print tolower($0)}')"
27+
case $lowerI in
28+
freebsd)
29+
__TestNugetRuntimeId="$__TestNugetRuntimeId=osx.10.10-x64"
30+
__BuildOS="$__BuildOS=freebsd"
31+
__TargetOS="$__TargetOS=freebsd"
32+
;;
33+
netbsd)
34+
__TestNugetRuntimeId="$__TestNugetRuntimeId=osx.10.10-x64"
35+
__BuildOS="$__BuildOS=netbsd"
36+
__TargetOS="$__TargetOS=netbsd"
37+
;;
38+
osx)
39+
__TestNugetRuntimeId="$__TestNugetRuntimeId=osx.10.10-x64"
40+
__BuildOS="$__BuildOS=osx"
41+
__TargetOS="$__TargetOS=osx"
42+
;;
43+
windows)
44+
__TestNugetRuntimeId="$__TestNugetRuntimeId=win7-x64"
45+
__BuildOS="$__BuildOS=windows_nt"
46+
__TargetOS="$__TargetOS=Windows_NT"
47+
;;
48+
useservergc)
49+
__ServerGC=1
50+
;;
51+
*)
52+
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
53+
esac
54+
55+
shift
56+
done
57+
58+
export CORECLR_SERVER_GC="$__ServerGC"
59+
60+
$__scriptpath/run.sh build-managed $__BuildOS $__TargetOS $__TestNugetRuntimeId $__UnprocessedBuildArgs
61+
exit $?

build-packages.cmd

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,2 @@
1-
@if "%_echo%" neq "on" echo off
2-
setlocal EnableDelayedExpansion
3-
4-
set packagesLog=build-packages.log
5-
set binclashLoggerDll=%~dp0Tools\net45\Microsoft.DotNet.Build.Tasks.dll
6-
set binclashlog=%~dp0binclash.log
7-
echo Running build-packages.cmd %* > %packagesLog%
8-
9-
set options=/nologo /maxcpucount /v:minimal /clp:Summary /nodeReuse:false /flp:v=detailed;Append;LogFile=%packagesLog% /l:BinClashLogger,%binclashLoggerDll%;LogFile=%binclashlog% /p:FilterToOSGroup=Windows_NT
10-
set allargs=%*
11-
12-
if /I [%1] == [/?] goto Usage
13-
if /I [%1] == [/help] goto Usage
14-
15-
REM ensure that msbuild is available
16-
echo Running init-tools.cmd
17-
call %~dp0init-tools.cmd
18-
19-
echo msbuild.exe %~dp0src\packages.builds !options! !allargs! >> %packagesLog%
20-
call msbuild.exe %~dp0src\packages.builds !options! !allargs!
21-
if NOT [%ERRORLEVEL%]==[0] (
22-
echo ERROR: An error occurred while building packages, see %packagesLog% for more details.
23-
exit /b 1
24-
)
25-
26-
echo Done Building Packages.
27-
exit /b
28-
29-
:Usage
30-
echo.
31-
echo Builds the NuGet packages from the binaries that were built in the Build product binaries step.
32-
echo No option parameters.
33-
exit /b
1+
@call %~dp0run.cmd build-managed -packages %*
2+
@exit /b %ERRORLEVEL%

build-packages.sh

Lines changed: 2 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,4 @@
11
#!/usr/bin/env bash
2-
3-
usage()
4-
{
5-
echo "Builds the NuGet packages from the binaries that were built in the Build product binaries step."
6-
echo "No option parameters."
7-
exit 1
8-
}
9-
102
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
11-
build_packages_log=$working_tree_root/build-packages.log
12-
binclashlog=$working_tree_root/binclash.log
13-
binclashloggerdll=$working_tree_root/Tools/Microsoft.DotNet.Build.Tasks.dll
14-
RuntimeOS=ubuntu.14.04
15-
16-
# Use uname to determine what the OS is.
17-
OSName=$(uname -s)
18-
case $OSName in
19-
Darwin)
20-
# Darwin version can be three sets of digits (e.g. 10.10.3), we want just the first one
21-
DarwinVersion=$(sw_vers -productVersion | awk 'match($0, /[0-9]+/) { print substr($0, RSTART, RLENGTH) }')
22-
RuntimeOS=osx.$DarwinVersion
23-
;;
24-
25-
FreeBSD|NetBSD)
26-
# TODO this doesn't seem correct
27-
RuntimeOS=osx.10
28-
;;
29-
30-
Linux)
31-
if [ ! -e /etc/os-release ]; then
32-
echo "Cannot determine Linux distribution, assuming Ubuntu 14.04"
33-
else
34-
source /etc/os-release
35-
# for some distros we only need the version major number
36-
VersionMajor=$(echo $VERSION_ID | awk 'match($0, /[0-9]+/) { print substr($0, RSTART, RLENGTH) }')
37-
if [ "$ID" == "rhel" ]; then
38-
RuntimeOS=$ID.$VersionMajor
39-
else
40-
RuntimeOS=$ID.$VERSION_ID
41-
fi
42-
fi
43-
;;
44-
45-
*)
46-
echo "Unsupported OS '$OSName' detected. Configuring as if for Ubuntu."
47-
;;
48-
esac
49-
50-
options="/m /nologo /v:minimal /clp:Summary /flp:v=diagnostic;Append;LogFile=$build_packages_log /l:BinClashLogger,$binclashloggerdll;LogFile=$binclashlog /p:FilterToOSGroup=$RuntimeOS"
51-
allargs="$@"
52-
53-
echo -e "Running build-packages.sh $allargs" > $build_packages_log
54-
55-
if [ "$allargs" == "-h" ] || [ "$allargs" == "--help" ]; then
56-
usage
57-
fi
58-
59-
# Ensure that MSBuild is available
60-
echo "Running init-tools.sh"
61-
$working_tree_root/init-tools.sh
62-
63-
echo -e "\n$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/packages.builds $options $allargs" >> $build_packages_log
64-
$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/packages.builds $options $allargs
65-
66-
67-
if [ $? -ne 0 ]; then
68-
echo -e "\nAn error occurred. Aborting build-packages.sh ." >> $build_packages_log
69-
echo "ERROR: An error occurred while building packages, see $build_packages_log for more details."
70-
exit 1
71-
fi
72-
73-
echo "Done building packages."
74-
echo -e "\nDone building packages." >> $build_packages_log
75-
exit 0
3+
$working_tree_root/run.sh build-managed -packages $*
4+
exit $?

build-tests.cmd

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,2 @@
1-
@if "%_echo%" neq "on" echo off
2-
setlocal EnableDelayedExpansion
3-
4-
set buildTests=build-tests.log
5-
set binclashLoggerDll=%~dp0Tools\net45\Microsoft.DotNet.Build.Tasks.dll
6-
set binclashlog=%~dp0binclash.log
7-
echo Running build-tests.cmd %* > %buildTests%
8-
9-
set options=/nologo /maxcpucount /v:minimal /clp:Summary /nodeReuse:false /flp:v=detailed;Append;LogFile=%buildTests% /l:BinClashLogger,%binclashLoggerDll%;LogFile=%binclashlog%
10-
set allargs=%*
11-
12-
if /I [%1] == [/?] goto Usage
13-
if /I [%1] == [/help] goto Usage
14-
15-
REM ensure that msbuild is available
16-
echo Running init-tools.cmd
17-
call %~dp0init-tools.cmd
18-
19-
echo msbuild.exe %~dp0src\tests.builds !options! !allargs! >> %buildTests%
20-
call msbuild.exe %~dp0src\tests.builds !options! !allargs!
21-
if NOT [%ERRORLEVEL%]==[0] (
22-
echo ERROR: An error occurred while building the tests, see %buildTests% for more details.
23-
exit /b 1
24-
)
25-
26-
echo Done Building tests.
27-
exit /b
28-
29-
:Usage
30-
echo.
31-
echo Builds the tests that are in the repository.
32-
echo No option parameters.
33-
exit /b
1+
@call %~dp0run.cmd build-managed -tests %*
2+
@exit /b %ERRORLEVEL%

build-tests.sh

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,4 @@
11
#!/usr/bin/env bash
2-
3-
usage()
4-
{
5-
echo "Builds the tests that are in the repository."
6-
echo "No option parameters."
7-
exit 1
8-
}
9-
102
working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
11-
build_tests_log=$working_tree_root/build-tests.log
12-
binclashlog=$working_tree_root/binclash.log
13-
binclashloggerdll=$working_tree_root/Tools/Microsoft.DotNet.Build.Tasks.dll
14-
15-
options="/m /nologo /v:minimal /clp:Summary /flp:v=detailed;Append;LogFile=$build_tests_log /l:BinClashLogger,$binclashloggerdll;LogFile=$binclashlog"
16-
allargs="$@"
17-
18-
echo -e "Running build-tests.sh $allargs" > $build_tests_log
19-
20-
if [ "$allargs" == "-h" ] || [ "$allargs" == "--help" ]; then
21-
usage
22-
fi
23-
24-
# Ensure that MSBuild is available
25-
echo "Running init-tools.sh"
26-
$working_tree_root/init-tools.sh
27-
28-
echo -e "\n$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/tests.builds $options $allargs" >> $build_tests_log
29-
$working_tree_root/Tools/dotnetcli/dotnet $working_tree_root/Tools/MSBuild.exe $working_tree_root/src/tests.builds $options $allargs
30-
31-
32-
if [ $? -ne 0 ]; then
33-
echo -e "\nAn error occurred. Aborting build-tests.sh ." >> $build_tests_log
34-
echo "ERROR: An error occurred while building tests, see $build_tests_log for more details."
35-
exit 1
36-
fi
37-
38-
echo "Done building tests."
39-
echo -e "\nDone building tests." >> $build_tests_log
40-
exit 0
3+
$working_tree_root/run.sh build-managed -tests $*
4+
exit $?

0 commit comments

Comments
 (0)