diff options
author | Kamil Rytarowski <n54@gmx.com> | 2016-02-28 01:13:12 +0300 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2016-02-28 01:13:12 +0300 |
commit | ae8c5c0717d9dda2b7d01c6655afe52e62eef68b (patch) | |
tree | be09049e527a325a65d9ae9b3ec98ccf101fd25b /run-test.sh | |
parent | 8bdc0a0ebdd6d98c2d0fc845220f8bf98b28fe19 (diff) |
Introduce new test target OS: NetBSD
Diffstat (limited to 'run-test.sh')
-rwxr-xr-x | run-test.sh | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/run-test.sh b/run-test.sh index 7d3e249524..9e20865d35 100755 --- a/run-test.sh +++ b/run-test.sh @@ -15,26 +15,26 @@ wait_on_pids() usage() { - echo "Runs .NET CoreFX tests on FreeBSD, Linux or OSX" + echo "Runs .NET CoreFX tests on FreeBSD, Linux, NetBSD or OSX" echo "usage: run-test [options]" echo echo "Input sources:" echo " --coreclr-bins <location> Location of root of the binaries directory" - echo " containing the FreeBSD, Linux or OSX coreclr build" + echo " containing the FreeBSD, Linux, NetBSD or OSX coreclr build" echo " default: <repo_root>/bin/Product/<OS>.x64.<ConfigurationGroup>" echo " --mscorlib-bins <location> Location of the root binaries directory containing" - echo " the FreeBSD, Linux or OSX mscorlib.dll" + echo " the FreeBSD, Linux, NetBSD or OSX mscorlib.dll" echo " default: <repo_root>/bin/Product/<OS>.x64.<ConfigurationGroup>" echo " --corefx-tests <location> Location of the root binaries location containing" echo " the tests to run" echo " default: <repo_root>/bin/tests/<OS>.AnyCPU.<ConfigurationGroup>" - echo " --corefx-native-bins <location> Location of the FreeBSD, Linux or OSX native corefx binaries" + echo " --corefx-native-bins <location> Location of the FreeBSD, Linux, NetBSD or OSX native corefx binaries" echo " default: <repo_root>/bin/<OS>.x64.<ConfigurationGroup>" echo echo "Flavor/OS options:" echo " --configurationGroup <config> ConfigurationGroup to run (Debug/Release)" echo " default: Debug" - echo " --os <os> OS to run (FreeBSD, Linux or OSX)" + echo " --os <os> OS to run (FreeBSD, Linux, NetBSD or OSX)" echo " default: detect current OS" echo echo "Execution options:" @@ -45,7 +45,7 @@ usage() echo "Runtime Code Coverage options:" echo " --coreclr-coverage Optional argument to get coreclr code coverage reports" echo " --coreclr-objs <location> Location of root of the object directory" - echo " containing the FreeBSD, Linux or OSX coreclr build" + echo " containing the FreeBSD, Linux, NetBSD or OSX coreclr build" echo " default: <repo_root>/bin/obj/<OS>.x64.<ConfigurationGroup" echo " --coreclr-src <location> Location of root of the directory" echo " containing the coreclr source files" @@ -71,6 +71,10 @@ case $OSName in OS=Linux ;; + NetBSD) + OS=NetBSD + ;; + *) echo "Unsupported OS $OSName detected, configuring as if for Linux" OS=Linux @@ -196,7 +200,7 @@ runtest() coreclr_code_coverage() { - if [ ! "$OS" == "FreeBSD" ] && [ ! "$OS" == "Linux" ] && [ ! "$OS" == "OSX" ] + if [ ! "$OS" == "FreeBSD" ] && [ ! "$OS" == "Linux" ] && [ ! "$OS" == "NetBSD" ] && [ ! "$OS" == "OSX" ] then echo "error: Code Coverage not supported on $OS" exit 1 @@ -325,9 +329,9 @@ then exit 1 fi -if [ ! "$OS" == "FreeBSD" ] && [ ! "$OS" == "Linux" ] && [ ! "$OS" == "OSX" ] +if [ ! "$OS" == "FreeBSD" ] && [ ! "$OS" == "Linux" ] && [ ! "$OS" == "NetBSD" ] && [ ! "$OS" == "OSX" ] then - echo "error: OS should be FreeBSD, Linux or OSX" + echo "error: OS should be FreeBSD, Linux, NetBSD or OSX" exit 1 fi @@ -351,6 +355,13 @@ create_test_overlay TestsFailed=0 numberOfProcesses=0 + +if [ `uname` = "NetBSD" ]; then + maxProcesses=$(($(getconf NPROCESSORS_ONLN)+1)) +else + maxProcesses=$(($(getconf _NPROCESSORS_ONLN)+1)) +fi + maxProcesses=$(($(getconf _NPROCESSORS_ONLN)+1)) TestProjects=($(find . -regex ".*/src/.*/tests/.*\.Tests\.csproj")) for file in ${TestProjects[@]} @@ -382,4 +393,3 @@ else fi exit $TestsFailed - |