This is an automated email from the ASF dual-hosted git repository. elek pushed a commit to branch debug-acceptance-timeout in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
commit 64caf25b7b2cc227dbd12b5a2ae0f0efe93ef7c7 Author: Márton Elek <e...@apache.org> AuthorDate: Fri Dec 6 09:13:33 2019 +0100 debug acceptance test timeout --- .github/workflows/post-commit.yml | 90 +--------------------- .github/workflows/tmate.sh | 7 ++ hadoop-ozone/dev-support/checks/acceptance.sh | 2 +- .../dist/src/main/compose/ozonesecure/test.sh | 2 +- hadoop-ozone/dist/src/main/compose/testlib.sh | 7 +- 5 files changed, 17 insertions(+), 91 deletions(-) diff --git a/.github/workflows/post-commit.yml b/.github/workflows/post-commit.yml index 5097be4..16877de 100644 --- a/.github/workflows/post-commit.yml +++ b/.github/workflows/post-commit.yml @@ -16,103 +16,19 @@ name: build-branch on: - push jobs: - build: - name: compile - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/build.sh - rat: - name: rat - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/rat.sh - - uses: actions/upload-artifact@master - if: always() - with: - name: rat - path: target/rat - author: - name: author - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/author.sh - - uses: actions/upload-artifact@master - if: always() - with: - name: author - path: target/author - unit: - name: unit - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/unit.sh - - uses: ./.github/buildenv - if: github.repository == 'apache/hadoop-ozone' - with: - args: ./hadoop-ozone/dev-support/checks/sonar.sh - env: - SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/upload-artifact@master - if: always() - with: - name: unit - path: target/unit - checkstyle: - name: checkstyle - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/checkstyle.sh - - uses: actions/upload-artifact@master - if: always() - with: - name: checkstyle - path: target/checkstyle - findbugs: - name: findbugs - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@master - - uses: ./.github/buildenv - with: - args: ./hadoop-ozone/dev-support/checks/findbugs.sh - - uses: actions/upload-artifact@master - if: always() - with: - name: findbugs - path: target/findbugs acceptance: name: acceptance runs-on: ubuntu-18.04 - needs: - - build - - rat - - checkstyle - - unit - - findbugs + timeout-minutes: 90 steps: - uses: actions/checkout@master + - run: ./.github/workflows/tmate.sh - uses: ./.github/buildenv with: args: ./hadoop-ozone/dev-support/checks/build.sh - run: sudo pip install robotframework - run: sudo chown runner -R . - - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws && sudo chown 1000 .aws + - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws && sudo chown 1000 .aws - run: ./hadoop-ozone/dev-support/checks/acceptance.sh - uses: actions/upload-artifact@master if: always() diff --git a/.github/workflows/tmate.sh b/.github/workflows/tmate.sh new file mode 100755 index 0000000..c10a557 --- /dev/null +++ b/.github/workflows/tmate.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -ex +sudo apt-get -y install tmate +tmate -S /tmp/tmate.sock new-session -d +sleep 2 +tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}' +tmate -S /tmp/tmate.sock display -p '#{tmate_web}' diff --git a/hadoop-ozone/dev-support/checks/acceptance.sh b/hadoop-ozone/dev-support/checks/acceptance.sh index c3c1aa0..71481ca 100755 --- a/hadoop-ozone/dev-support/checks/acceptance.sh +++ b/hadoop-ozone/dev-support/checks/acceptance.sh @@ -15,7 +15,7 @@ # limitations under the License. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$DIR/../../.." || exit 1 - +set -x REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/acceptance"} mkdir -p "$REPORT_DIR" diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure/test.sh b/hadoop-ozone/dist/src/main/compose/ozonesecure/test.sh index f328463..a925f36 100755 --- a/hadoop-ozone/dist/src/main/compose/ozonesecure/test.sh +++ b/hadoop-ozone/dist/src/main/compose/ozonesecure/test.sh @@ -14,7 +14,7 @@ # 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. - +set -x COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" export COMPOSE_DIR diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh b/hadoop-ozone/dist/src/main/compose/testlib.sh index c1cae05..0b8371f 100755 --- a/hadoop-ozone/dist/src/main/compose/testlib.sh +++ b/hadoop-ozone/dist/src/main/compose/testlib.sh @@ -89,6 +89,7 @@ start_docker_env(){ ## @param Name of the container in the docker-compose file ## @param robot test file or directory relative to the smoketest dir execute_robot_test(){ + set -x CONTAINER="$1" shift 1 #Remove first argument which was the container name # shellcheck disable=SC2206 @@ -101,13 +102,15 @@ execute_robot_test(){ OUTPUT_NAME="$COMPOSE_ENV_NAME-$TEST_NAME-$CONTAINER" OUTPUT_PATH="$RESULT_DIR_INSIDE/robot-$OUTPUT_NAME.xml" docker-compose -f "$COMPOSE_FILE" exec -T "$CONTAINER" mkdir -p "$RESULT_DIR_INSIDE" + + docker-compose -f "$COMPOSE_FILE" exec -T -e SECURITY_ENABLED="${SECURITY_ENABLED}" "$CONTAINER" ln -f -s /dev/stdout /tmp/out.txt # shellcheck disable=SC2068 - docker-compose -f "$COMPOSE_FILE" exec -T -e SECURITY_ENABLED="${SECURITY_ENABLED}" "$CONTAINER" python -m robot ${ARGUMENTS[@]} --log NONE -N "$TEST_NAME" --report NONE "${OZONE_ROBOT_OPTS[@]}" --output "$OUTPUT_PATH" "$SMOKETEST_DIR_INSIDE/$TEST" + docker-compose -f "$COMPOSE_FILE" exec -T -e SECURITY_ENABLED="${SECURITY_ENABLED}" "$CONTAINER" python -m robot ${ARGUMENTS[@]} --log NONE -N "$TEST_NAME" --debugfile /tmp/out --report NONE "${OZONE_ROBOT_OPTS[@]}" --output "$OUTPUT_PATH" "$SMOKETEST_DIR_INSIDE/$TEST" FULL_CONTAINER_NAME=$(docker-compose -f "$COMPOSE_FILE" ps | grep "_${CONTAINER}_" | head -n 1 | awk '{print $1}') docker cp "$FULL_CONTAINER_NAME:$OUTPUT_PATH" "$RESULT_DIR/" set -e - + set +x } --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org