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 2021/08/09 17:12:31 UTC

[GitHub] [ozone] ghuangups opened a new pull request #2514: HDDS-5540. Acceptance test: able to generate result in xunit/junit fo…

ghuangups opened a new pull request #2514:
URL: https://github.com/apache/ozone/pull/2514


   …rmat as well
   
   ## What changes were proposed in this pull request?
   
   This change adds the capability of Ozone acceptance tests to generate result in xunit/junit format as well.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-5540
   
   ## How was this patch tested?
   Tested in house with private runs and verified xunit/junit result file was generated.
   
   (Please explain how this patch was tested. Ex: unit tests, manual tests)
   (If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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



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


[GitHub] [ozone] ghuangups commented on pull request #2514: HDDS-5540. Acceptance test: able to generate result in xunit/junit format as well

Posted by GitBox <gi...@apache.org>.
ghuangups commented on pull request #2514:
URL: https://github.com/apache/ozone/pull/2514#issuecomment-897862348


   Thanks Attila for the great comments!


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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



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


[GitHub] [ozone] adoroszlai commented on pull request #2514: HDDS-5540. Acceptance test: able to generate result in xunit/junit format as well

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on pull request #2514:
URL: https://github.com/apache/ozone/pull/2514#issuecomment-896702245


   > Tested in house with private runs and verified xunit/junit result file was generated.
   
   Simple test steps for reproducibility:
   
   ```
   $ cd hadoop-ozone/dist/target/ozone-1.2.0-SNAPSHOT/compose
   $ OZONE_TEST_SELECTOR='ozone-csi' ./test-all.sh /tmp
   # or with the suggested changes:
   # XUNIT_RESULT_DIR=/tmp OZONE_TEST_SELECTOR='ozone-csi' ./test-all.sh
   Executing test in ozone-csi
   ...
   XUnit:   /tmp/TEST-ozone.xml
   Log:     hadoop-ozone/dist/target/ozone-1.2.0-SNAPSHOT/compose/result/log.html
   Report:  hadoop-ozone/dist/target/ozone-1.2.0-SNAPSHOT/compose/result/report.html
   ```


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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



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


[GitHub] [ozone] adoroszlai commented on a change in pull request #2514: HDDS-5540. Acceptance test: able to generate result in xunit/junit fo…

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2514:
URL: https://github.com/apache/ozone/pull/2514#discussion_r686680597



##########
File path: hadoop-ozone/dist/src/main/compose/testlib.sh
##########
@@ -297,10 +297,19 @@ cleanup_docker_images() {
 generate_report(){
   local title="${1:-${COMPOSE_ENV_NAME}}"
   local dir="${2:-${RESULT_DIR}}"
+  local xunitdir=""
+  if test "$#" -eq 3; then
+    xunitdir="${3}"
+  fi

Review comment:
       ```suggestion
     local xunitdir="${3:-}"
   ```

##########
File path: hadoop-ozone/dist/src/main/compose/test-all.sh
##########
@@ -44,6 +49,11 @@ if [ "$OZONE_WITH_COVERAGE" ]; then
   cp /tmp/jacoco-combined.exec "$SCRIPT_DIR"/result
 fi
 
-generate_report "acceptance" "${ALL_RESULT_DIR}"
+if [ -z "$XUNIT_RESULT_DIR" ]
+then
+  generate_report "acceptance" "${ALL_RESULT_DIR}"
+else
+  generate_report "acceptance" "${ALL_RESULT_DIR}" "${XUNIT_RESULT_DIR}"
+fi

Review comment:
       This can be simplified, since `generate_report` can handle empty parameter:
   
   ```suggestion
   generate_report "acceptance" "${ALL_RESULT_DIR}" "${XUNIT_RESULT_DIR}"
   ```

##########
File path: hadoop-ozone/dist/src/main/compose/testlib.sh
##########
@@ -297,10 +297,19 @@ cleanup_docker_images() {
 generate_report(){
   local title="${1:-${COMPOSE_ENV_NAME}}"
   local dir="${2:-${RESULT_DIR}}"
+  local xunitdir=""
+  if test "$#" -eq 3; then
+    xunitdir="${3}"
+  fi
 
   if command -v rebot > /dev/null 2>&1; then
      #Generate the combined output and return with the right exit code (note: robot = execute test, rebot = generate output)
-     rebot --reporttitle "${title}" -N "${title}" -d "${dir}" "${dir}/*.xml"
+     if [ -z "${xunitdir}" ]
+     then

Review comment:
       ```suggestion
        if [ -z "${xunitdir}" ]; then
   ```

##########
File path: hadoop-ozone/dist/src/main/compose/test-all.sh
##########
@@ -18,12 +18,17 @@
 
 #
 # Test executor to test all the compose/*/test.sh test scripts.
+# Optional path parameter is to generate and store result file in XUNIT format as well.

Review comment:
       ```suggestion
   ```

##########
File path: hadoop-ozone/dist/src/main/compose/test-all.sh
##########
@@ -18,12 +18,17 @@
 
 #
 # Test executor to test all the compose/*/test.sh test scripts.
+# Optional path parameter is to generate and store result file in XUNIT format as well.
 #
 SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )
 ALL_RESULT_DIR="$SCRIPT_DIR/result"
 PROJECT_DIR="$SCRIPT_DIR/.."
 mkdir -p "$ALL_RESULT_DIR"
 rm "$ALL_RESULT_DIR"/* || true
+XUNIT_RESULT_DIR=""
+if test "$#" -eq 1; then
+    XUNIT_RESULT_DIR="${1}"
+fi

Review comment:
       I think `test-all.sh` should simply use `XUNIT_RESULT_DIR` environment variable if it exists, instead of taking it from positional parameters.  This would be more consistent with other optional items (e.g. `OZONE_WITH_COVERAGE` is in this script, `OM_SERVICE_ID`, `OZONE_TEST_SELECTOR`, `RESULT_DIR`, etc. in `testlib.sh`).
   
   ```suggestion
   ```




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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



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


[GitHub] [ozone] swagle merged pull request #2514: HDDS-5540. Acceptance test: able to generate result in xunit/junit format as well

Posted by GitBox <gi...@apache.org>.
swagle merged pull request #2514:
URL: https://github.com/apache/ozone/pull/2514


   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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



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