Skip to content

Commit

Permalink
build-and-test.sh: fix TIDY build
Browse files Browse the repository at this point in the history
The Jenkins job that runs the TIDY build doesn't set JAVA8_HOME, which means
we wind up with an empty JAVA_HOME (different from an unset JAVA_HOME). This
causes cmake to produce an error:

  CMake Error at cmake_modules/FindJavaHome.cmake:54 (message):
    $JAVA_HOME () does not contain bin/java
  Call Stack (most recent call first):
    CMakeLists.txt:988 (find_package)

  -- Configuring incomplete, errors occurred!

Change-Id: I19e977c9ddbc25683882ad59766b0e4beb2967e0
Reviewed-on: http://gerrit.cloudera.org:8080/15445
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Adar Dembo <[email protected]>
  • Loading branch information
adembo committed Mar 16, 2020
1 parent 6bf82d4 commit c4e2561
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build-support/jenkins/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,10 @@ else
fi

# Make sure we use JDK8
export JAVA_HOME=$JAVA8_HOME
export PATH=$JAVA_HOME/bin:$PATH
if [ -n "$JAVA8_HOME" ]; then
export JAVA_HOME=$JAVA8_HOME
export PATH=$JAVA_HOME/bin:$PATH
fi

# Some portions of the C++ build may depend on Java code, so we may run Gradle
# while building. Pass in some flags suitable for automated builds; these will
Expand Down

0 comments on commit c4e2561

Please sign in to comment.