From 4bc4fae07384b547fc64e60d3e4dd8e6ed35196a Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 8 Oct 2019 12:05:45 +0200 Subject: [PATCH] ci: cleanup platform detection --- src/ci/run.sh | 2 +- src/ci/shared.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ci/run.sh b/src/ci/run.sh index 0d5ea371245..bce35670c8d 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -117,7 +117,7 @@ make check-bootstrap # Display the CPU and memory information. This helps us know why the CI timing # is fluctuating. -if isOSX; then +if isMacOS; then system_profiler SPHardwareDataType || true sysctl hw || true ncpus=$(sysctl -n hw.ncpu) diff --git a/src/ci/shared.sh b/src/ci/shared.sh index 3d54c94de38..37e45b5639d 100644 --- a/src/ci/shared.sh +++ b/src/ci/shared.sh @@ -30,16 +30,16 @@ function isCI { [ "$CI" = "true" ] || [ "$TF_BUILD" = "True" ] } -function isOSX { +function isMacOS { [ "$AGENT_OS" = "Darwin" ] } -function isMacOS { - isOSX +function isWindows { + [ "$AGENT_OS" = "Windows_NT" ] } -function isWindows { - [ "$AGENT_OS" = "Windows_NT" ] +function isLinux { + [ "$AGENT_OS" = "Linux" ] } function getCIBranch {