Skip to content

Commit 52de79e

Browse files
committed
Set TRAVIS_OS_NAME fallback in Docker runner
Export TRAVIS_OS_NAME from uname when unset so older test suites that still use Travis-style platform checks behave consistently in local container runs. This keeps existing values intact if TRAVIS_OS_NAME is already provided.
1 parent 81029d8 commit 52de79e

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

docker/entrypoint.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,28 @@ ensure_git_identity() {
1919
fi
2020
}
2121

22+
ensure_ci_platform_compat() {
23+
# Some test suites still key off Travis-style OS markers.
24+
if [ -n "$TRAVIS_OS_NAME" ]; then
25+
return
26+
fi
27+
28+
case "$(uname -s)" in
29+
Linux*)
30+
export TRAVIS_OS_NAME=linux
31+
;;
32+
Darwin*)
33+
export TRAVIS_OS_NAME=osx
34+
;;
35+
CYGWIN*|MINGW*|MSYS*)
36+
export TRAVIS_OS_NAME=windows
37+
;;
38+
esac
39+
}
40+
2241
sudo sh -e /etc/init.d/xvfb start
2342
ensure_git_identity
43+
ensure_ci_platform_compat
2444

2545
UNITTESTING_SOURCE=${UNITTESTING_SOURCE:-/unittesting}
2646
SUBLIME_TEXT_VERSION=${SUBLIME_TEXT_VERSION:-4}

0 commit comments

Comments
 (0)