You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/06/11 07:24:38 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #1050: HDDS-3757. Add test coverage of the acceptance tests to overall test coverage

adoroszlai commented on a change in pull request #1050:
URL: https://github.com/apache/hadoop-ozone/pull/1050#discussion_r438590181



##########
File path: hadoop-ozone/dev-support/checks/acceptance.sh
##########
@@ -17,19 +17,32 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 cd "$DIR/../../.." || exit 1
 
 REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/acceptance"}
-mkdir -p "$REPORT_DIR"
 
 OZONE_VERSION=$(grep "<ozone.version>" "pom.xml" | sed 's/<[^>]*>//g'|  sed 's/^[ \t]*//')
 DIST_DIR="$DIR/../../dist/target/ozone-$OZONE_VERSION"
 
 if [ ! -d "$DIST_DIR" ]; then
     echo "Distribution dir is missing. Doing a full build"
-    "$DIR/build.sh"
+    "$DIR/build.sh" -Pjacoco
 fi
 
+mkdir -p "$REPORT_DIR"
+
+export HADOOP_OPTS='-javaagent:/opt/hadoop/share/jacoco/jacoco-agent.jar=destfile=/tmp/jacoco.exec,includes=org.apache.hadoop.ozone.*:org.apache.hadoop.hdds'

Review comment:
       Now `acceptance.sh` requires `jacoco-agent.jar`, which is only built when invoked with `-Pjacoco`.  I would like to suggest moving this definition to the GitHub Actions definition (in the `env` section, where `KEEP_IMAGE` is defined, too).

##########
File path: hadoop-ozone/dist/src/main/compose/ozone-csi/docker-compose.yaml
##########
@@ -23,6 +23,8 @@ services:
       - ../..:/opt/hadoop
     env_file:
       - docker-config
+    environment:
+      HADOOP_OPTS: ${HADOOP_OPTS}

Review comment:
       I think we can avoid these by passing the variable via `-e` option of `docker-compose`, similar to how it is done for some other variables (`SECURITY_ENABLED`, etc.):
   
   https://github.com/apache/hadoop-ozone/blob/53395a0ed75d96575a7dc26a7adec4eefabb2b74/hadoop-ozone/dist/src/main/compose/testlib.sh#L107




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org