Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Bogatov <egorbo@gmail.com>2019-06-06 18:43:58 +0300
committerMarek Safar <marek.safar@gmail.com>2019-06-06 18:43:57 +0300
commitb861cacd4828d525aa37ddd2e3f18454f7a95f41 (patch)
tree4f59d9183f03ba9d78ff8c5470e38f48f1be28d3 /netcore/build.sh
parent636e06334f6b079a5f215b4bfce3083c8eacf3b8 (diff)
[netcore] Improve netcore/build.sh script (#14835)
* Improve netcore/build.sh * bump corefx tests version * ignore StringTests failures * Ignore more tests for xtestall * Implement Environment.TickCount64 * cleanup * Add two debug-* rules
Diffstat (limited to 'netcore/build.sh')
-rwxr-xr-xnetcore/build.sh45
1 files changed, 38 insertions, 7 deletions
diff --git a/netcore/build.sh b/netcore/build.sh
index 6b3ea801d5f..ac7a651c74b 100755
--- a/netcore/build.sh
+++ b/netcore/build.sh
@@ -1,5 +1,12 @@
#!/usr/bin/env bash
+# Stop script if unbound variable found (use ${var:-} if intentional)
+set -u
+
+# Stop script if command returns non-zero exit code.
+# Prevents hidden errors caused by missing error code propagation.
+set -e
+
usage()
{
echo "Common settings:"
@@ -10,6 +17,9 @@ usage()
echo "Actions:"
echo " --pack Package build outputs into NuGet packages"
echo " --test Run all unit tests in the solution (short: -t)"
+ echo " --rebuild Run ../.autogen.sh"
+ echo " --skipnative Do not build runtime"
+ echo " --skipmscorlib Do not build System.Private.CoreLib"
echo ""
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
@@ -19,6 +29,10 @@ usage()
pack=false
configuration='Debug'
properties=''
+force_rebuild=false
+test=false
+skipmscorlib=false
+skipnative=false
while [[ $# > 0 ]]; do
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
@@ -38,6 +52,15 @@ while [[ $# > 0 ]]; do
-test|-t)
test=true
;;
+ -rebuild)
+ force_rebuild=true
+ ;;
+ -skipmscorlib)
+ skipmscorlib=true
+ ;;
+ -skipnative)
+ skipnative=true
+ ;;
-p:*|/p:*)
properties="$properties $1"
;;
@@ -61,24 +84,32 @@ while [[ $# > 0 ]]; do
done
-cd ..
-./autogen.sh --with-core=only
-cd netcore
+# run .././autogen.sh only once or if "--rebuild" argument is provided
+if [[ "$force_rebuild" == "true" || ! -f .configured ]]; then
+ cd ..
+ ./autogen.sh --with-core=only
+ cd netcore
+ touch .configured
+fi
CPU_COUNT=$(getconf _NPROCESSORS_ONLN || echo 4)
# build mono runtime
-make runtime -j$(CPU_COUNT)
+if [ "$skipnative" = "false" ]; then
+ make runtime -j$CPU_COUNT
+fi
# build System.Private.CoreLib (../mcs/class/System.Private.CoreLib)
-make bcl CORLIB_BUILD_FLAGS="$properties"
+if [ "$skipmscorlib" = "false" ]; then
+ make bcl CORLIB_BUILD_FLAGS="$properties"
+fi
# create a nupkg with runtime and System.Private.CoreLib
if [ "$pack" = "true" ]; then
- make nupkg
+ make nupkg
fi
# run all xunit tests
if [ "$test" = "true" ]; then
- make xtestall
+ make xtestall
fi \ No newline at end of file