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/07/29 17:50:03 UTC

[GitHub] [hadoop-ozone] elek commented on a change in pull request #1263: HDDS-4033. Make the acceptance test reports hierarchical

elek commented on a change in pull request #1263:
URL: https://github.com/apache/hadoop-ozone/pull/1263#discussion_r462120888



##########
File path: hadoop-ozone/dist/src/main/compose/ozone/test.sh
##########
@@ -35,14 +35,14 @@ execute_robot_test scm gdpr
 
 for scheme in ofs o3fs; do
   for bucket in link bucket; do
-    execute_robot_test scm -v SCHEME:${scheme} -v BUCKET_TYPE:${bucket} ozonefs/ozonefs.robot
+    execute_robot_test scm -v SCHEME:${scheme} -v BUCKET_TYPE:${bucket} -N ozonefs-${scheme}-${bucket} ozonefs/ozonefs.robot

Review comment:
       :+1: 

##########
File path: hadoop-ozone/dist/src/main/compose/test-all.sh
##########
@@ -46,9 +46,12 @@ for test in $(find "$SCRIPT_DIR" -name test.sh | grep "${OZONE_TEST_SELECTOR:-""
       echo "ERROR: Test execution of $(dirname "$test") is FAILED!!!!"
   fi
   RESULT_DIR="$(dirname "$test")/result"
-  cp "$RESULT_DIR"/robot-*.xml "$RESULT_DIR"/docker-*.log "$RESULT_DIR"/*.out* "$ALL_RESULT_DIR"/
+  rebot -N $(basename $(dirname "$test")) -o "$ALL_RESULT_DIR"/$(basename $(dirname "$test")).xml "$RESULT_DIR"/*.xml

Review comment:
       done (got `${d}` with the rebase...)

##########
File path: hadoop-ozone/dist/src/main/compose/ozone-mr/test.sh
##########
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )
+ALL_RESULT_DIR="$SCRIPT_DIR/result"
+set -x
+RESULT=0
+IFS=$'\n'
+# shellcheck disable=SC2044
+for test in $(find "$SCRIPT_DIR" -mindepth 2 -maxdepth 2 -name test.sh | grep "${OZONE_TEST_SELECTOR:-""}" |sort); do

Review comment:
       Hmm. I think I should move out the tricky `find` segment (contains the `#suite` support) to the `testlib.sh` and reuse it from the second level `test.sh`.

##########
File path: hadoop-ozone/dist/src/test/shell/compose_testlib.bats
##########
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+source ../../main/compose/testlib.sh
+@test "Find test recursive, only on one level" {
+  run find_tests
+  echo "x${output}x}"
+  [[ "$output" == "./test1/test.sh ./test2/test.sh ./test4/test.sh" ]]
+}
+
+source ../../main/compose/testlib.sh

Review comment:
       Yes, I learned from you that `load` can be used, but it doesnt work for me:
   
   ```
   bats compose_testlib.bats
   bats: /home/elek/projects/ozone/hadoop-ozone/dist/src/test/shell/../../main/compose/testlib.sh.bash does not exist
   ```
   
   Don't know why....




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