Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#4181]Improvement: Support setting gradle property skipDockerTests by environment variant #4229

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,14 @@ fun printDockerCheckInfo() {
val dockerRunning = project.extra["dockerRunning"] as? Boolean ?: false
val macDockerConnector = project.extra["macDockerConnector"] as? Boolean ?: false
val isOrbStack = project.extra["isOrbStack"] as? Boolean ?: false

if (extra["skipDockerTests"].toString().toBoolean()) {
val skipDockerTests = if (extra["skipDockerTests"].toString().toBoolean()) {
// Read the environment variable (SKIP_DOCKER_TESTS) when skipDockerTests is true
// which means users can enable the docker tests by setting the gradle properties or the environment variable.
System.getenv("SKIP_DOCKER_TESTS")?.toBoolean() ?: true
} else {
false
}
if (skipDockerTests) {
project.extra["dockerTest"] = false
} else if (OperatingSystem.current().isMacOsX() &&
dockerRunning &&
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ license: "This software is licensed under the Apache License version 2."
+ Gravitino uses the Gradle Java Toolchain to detect and manage JDK versions, it checks the
installed JDK by running the `./gradlew javaToolchains` command. See [Gradle Java Toolchain](https://docs.gradle.org/current/userguide/toolchains.html#sec:java_toolchain).
+ Gravitino excludes all Docker-related tests by default. To run Docker related tests, make sure you have installed
Docker in your environment and set `skipDockerTests=false` in the `gradle.properties` file (or
use `-PskipDockerTests=false` in the command). Otherwise, all Docker required tests will skip.
Docker in your environment and either (1) set `skipDockerTests=false` in the `gradle.properties` file (or
use `-PskipDockerTests=false` in the command) or (2) `export SKIP_DOCKER_TESTS=false` in shell. Otherwise, all Docker required tests will skip.
+ macOS uses `docker-connector` to make the Gravitino Trino connector work with Docker
for macOS. See [docker-connector](https://github.com/wenjunxiao/mac-docker-connector), `$GRAVITINO_HOME/dev/docker/tools/mac-docker-connector.sh`, and
`$GRAVITINO_HOME/dev/docker/tools/README.md` for more details.
Expand Down
Loading