diff options
author | pmikus <peter.mikus@protonmail.ch> | 2023-07-07 05:59:34 +0000 |
---|---|---|
committer | pmikus <peter.mikus@protonmail.ch> | 2023-07-07 06:19:04 +0000 |
commit | 0f195d86c9f5cf0fa8e82464428158a86f0b6113 (patch) | |
tree | d763432e5d574fefbf1becf73f39cd5fec8c0100 /resources/libraries | |
parent | 7919c38c048cefc5bfcf814730d182bc91ee7865 (diff) |
fix(core): Remove output_info.xml processingoper-230710
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: I1528d7760228d50a4d89c0e413ad86aa882088ed
Diffstat (limited to 'resources/libraries')
-rwxr-xr-x | resources/libraries/bash/entry/bootstrap_verify_perf.sh | 8 | ||||
-rwxr-xr-x | resources/libraries/bash/entry/bootstrap_vpp_device.sh | 8 | ||||
-rw-r--r-- | resources/libraries/bash/entry/per_patch_device.sh | 8 | ||||
-rw-r--r-- | resources/libraries/bash/entry/per_patch_perf.sh | 10 | ||||
-rw-r--r-- | resources/libraries/bash/function/common.sh | 60 | ||||
-rw-r--r-- | resources/libraries/bash/function/gather.sh | 4 | ||||
-rwxr-xr-x | resources/libraries/bash/function/nginx.sh | 8 |
7 files changed, 42 insertions, 64 deletions
diff --git a/resources/libraries/bash/entry/bootstrap_verify_perf.sh b/resources/libraries/bash/entry/bootstrap_verify_perf.sh index 99813573ea..fd677166b0 100755 --- a/resources/libraries/bash/entry/bootstrap_verify_perf.sh +++ b/resources/libraries/bash/entry/bootstrap_verify_perf.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 Cisco and/or its affiliates. # Licensed 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: @@ -47,9 +47,9 @@ prepare_topology || die select_topology || die reserve_and_cleanup_testbed || die select_tags || die -compose_pybot_arguments || die +compose_robot_arguments || die set_environment_variables || die -run_pybot || die +run_robot || die untrap_and_unreserve_testbed || die move_archives || die -die_on_pybot_error || die +die_on_robot_error || die diff --git a/resources/libraries/bash/entry/bootstrap_vpp_device.sh b/resources/libraries/bash/entry/bootstrap_vpp_device.sh index ae4c26a1ba..31038b0643 100755 --- a/resources/libraries/bash/entry/bootstrap_vpp_device.sh +++ b/resources/libraries/bash/entry/bootstrap_vpp_device.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 Cisco and/or its affiliates. # Licensed 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: @@ -45,8 +45,8 @@ prepare_topology || die select_topology || die activate_docker_topology || die select_tags || die -compose_pybot_arguments || die +compose_robot_arguments || die set_environment_variables || die -run_pybot || die +run_robot || die move_archives || die -die_on_pybot_error || die +die_on_robot_error || die diff --git a/resources/libraries/bash/entry/per_patch_device.sh b/resources/libraries/bash/entry/per_patch_device.sh index db977b6e96..950a52209d 100644 --- a/resources/libraries/bash/entry/per_patch_device.sh +++ b/resources/libraries/bash/entry/per_patch_device.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 Cisco and/or its affiliates. # Licensed 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: @@ -55,7 +55,7 @@ prepare_topology || die select_topology || die activate_docker_topology || die select_tags || die -compose_pybot_arguments || die -run_pybot || die +compose_robot_arguments || die +run_robot || die move_archives || die -die_on_pybot_error || die +die_on_robot_error || die diff --git a/resources/libraries/bash/entry/per_patch_perf.sh b/resources/libraries/bash/entry/per_patch_perf.sh index e7702070c9..4a756d2c25 100644 --- a/resources/libraries/bash/entry/per_patch_perf.sh +++ b/resources/libraries/bash/entry/per_patch_perf.sh @@ -59,7 +59,7 @@ generate_tests || die archive_tests || die reserve_and_cleanup_testbed || die select_tags || die -compose_pybot_arguments || die +compose_robot_arguments || die set_environment_variables || die # Support for interleaved measurements is kept for future. iterations=1 # 8 @@ -72,16 +72,16 @@ for ((iter=0; iter<iterations; iter++)); do # Testing current first. Good for early failures or for API changes. select_build "build_current" || die check_download_dir || die - run_pybot || die + run_robot || die archive_parse_test_results "csit_current/${iter}" || die - die_on_pybot_error || die + die_on_robot_error || die # TODO: Use less heavy way to avoid apt remove failures. ansible_playbook "cleanup" || die select_build "build_parent" || die check_download_dir || die - run_pybot || die + run_robot || die archive_parse_test_results "csit_parent/${iter}" || die - die_on_pybot_error || die + die_on_robot_error || die done untrap_and_unreserve_testbed || die compare_test_results # The error code becomes this script's error code. diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index c9845c1624..fa4b8e757c 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -158,7 +158,7 @@ function check_download_dir () { # Fail if there are no files visible in ${DOWNLOAD_DIR}. # # Variables read: - # - DOWNLOAD_DIR - Path to directory pybot takes the build to test from. + # - DOWNLOAD_DIR - Path to directory robot takes the build to test from. # Directories read: # - ${DOWNLOAD_DIR} - Has to be non-empty to proceed. # Functions called: @@ -255,7 +255,7 @@ function common_dirs () { } -function compose_pybot_arguments () { +function compose_robot_arguments () { # Variables read: # - WORKING_TOPOLOGY - Path to topology yaml file of the reserved testbed. @@ -265,21 +265,21 @@ function compose_pybot_arguments () { # - TEST_CODE - The test selection string from environment or argument. # - SELECTION_MODE - Selection criteria [test, suite, include, exclude]. # Variables set: - # - PYBOT_ARGS - String holding part of all arguments for pybot. - # - EXPANDED_TAGS - Array of strings pybot arguments compiled from tags. + # - ROBOT_ARGS - String holding part of all arguments for robot. + # - EXPANDED_TAGS - Array of strings robot arguments compiled from tags. set -exuo pipefail # No explicit check needed with "set -u". - PYBOT_ARGS=("--loglevel" "TRACE") - PYBOT_ARGS+=("--variable" "TOPOLOGY_PATH:${WORKING_TOPOLOGY}") + ROBOT_ARGS=("--loglevel" "TRACE") + ROBOT_ARGS+=("--variable" "TOPOLOGY_PATH:${WORKING_TOPOLOGY}") case "${TEST_CODE}" in *"device"*) - PYBOT_ARGS+=("--suite" "tests.${DUT}.device") + ROBOT_ARGS+=("--suite" "tests.${DUT}.device") ;; *"perf"*) - PYBOT_ARGS+=("--suite" "tests.${DUT}.perf") + ROBOT_ARGS+=("--suite" "tests.${DUT}.perf") ;; *) die "Unknown specification: ${TEST_CODE}" @@ -357,19 +357,19 @@ function die () { } -function die_on_pybot_error () { +function die_on_robot_error () { # Source this fragment if you want to abort on any failed test case. # # Variables read: - # - PYBOT_EXIT_STATUS - Set by a pybot running fragment. + # - ROBOT_EXIT_STATUS - Set by a robot running fragment. # Functions called: # - die - Print to stderr and exit. set -exuo pipefail - if [[ "${PYBOT_EXIT_STATUS}" != "0" ]]; then - die "Test failures are present!" "${PYBOT_EXIT_STATUS}" + if [[ "${ROBOT_EXIT_STATUS}" != "0" ]]; then + die "Test failures are present!" "${ROBOT_EXIT_STATUS}" fi } @@ -382,7 +382,7 @@ function generate_tests () { # within any subdirectory after copying. # This is a separate function, because this code is called - # both by autogen checker and entries calling run_pybot. + # both by autogen checker and entries calling run_robot. # Directories read: # - ${CSIT_DIR}/tests - Used as templates for the generated tests. @@ -614,25 +614,6 @@ function move_archives () { } -function post_process_robot_outputs () { - - # Generate INFO level output_info.xml by rebot. - # - # Variables read: - # - ARCHIVE_DIR - Path to post-processed files. - - set -exuo pipefail - - # Generate INFO level output_info.xml for post-processing. - all_options=("--loglevel" "INFO") - all_options+=("--log" "none") - all_options+=("--report" "none") - all_options+=("--output" "${ARCHIVE_DIR}/output_info.xml") - all_options+=("${ARCHIVE_DIR}/output.xml") - rebot "${all_options[@]}" || true -} - - function prepare_topology () { # Prepare virtual testbed topology if needed based on flavor. @@ -742,34 +723,31 @@ function reserve_and_cleanup_testbed () { } -function run_pybot () { +function run_robot () { - # Run pybot with options based on input variables. - # Generate INFO level output_info.xml by rebot. + # Run robot with options based on input variables. # # Variables read: # - CSIT_DIR - Path to existing root of local CSIT git repository. # - ARCHIVE_DIR - Path to store robot result files in. - # - PYBOT_ARGS, EXPANDED_TAGS - See compose_pybot_arguments.sh + # - ROBOT_ARGS, EXPANDED_TAGS - See compose_robot_arguments.sh # - GENERATED_DIR - Tests are assumed to be generated under there. # Variables set: - # - PYBOT_EXIT_STATUS - Exit status of most recent pybot invocation. + # - ROBOT_EXIT_STATUS - Exit status of most recent robot invocation. # Functions called: # - die - Print to stderr and exit. set -exuo pipefail - all_options=("--outputdir" "${ARCHIVE_DIR}" "${PYBOT_ARGS[@]}") + all_options=("--outputdir" "${ARCHIVE_DIR}" "${ROBOT_ARGS[@]}") all_options+=("${EXPANDED_TAGS[@]}") pushd "${CSIT_DIR}" || die "Change directory operation failed." set +e robot "${all_options[@]}" "${GENERATED_DIR}/tests/" - PYBOT_EXIT_STATUS="$?" + ROBOT_EXIT_STATUS="$?" set -e - post_process_robot_outputs || die - popd || die "Change directory operation failed." } diff --git a/resources/libraries/bash/function/gather.sh b/resources/libraries/bash/function/gather.sh index afe7345f6e..ce1ed5bffc 100644 --- a/resources/libraries/bash/function/gather.sh +++ b/resources/libraries/bash/function/gather.sh @@ -26,7 +26,7 @@ function gather_build () { # Variables read: # - TEST_CODE - String affecting test selection, usually jenkins job name. - # - DOWNLOAD_DIR - Path to directory pybot takes the build to test from. + # - DOWNLOAD_DIR - Path to directory robot takes the build to test from. # Variables set: # - DUT - CSIT test/ subdirectory containing suites to execute. # Directories updated: @@ -131,7 +131,7 @@ function gather_vpp () { # Variables read: # - BASH_FUNCTION_DIR - Bash directory with functions. # - TEST_CODE - The test selection string from environment or argument. - # - DOWNLOAD_DIR - Path to directory pybot takes the build to test from. + # - DOWNLOAD_DIR - Path to directory robot takes the build to test from. # - CSIT_DIR - Path to existing root of local CSIT git repository. # Variables set: # - VPP_VERSION - VPP stable version under test. diff --git a/resources/libraries/bash/function/nginx.sh b/resources/libraries/bash/function/nginx.sh index 122af23852..a2cf8e6514 100755 --- a/resources/libraries/bash/function/nginx.sh +++ b/resources/libraries/bash/function/nginx.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021 Intel and/or its affiliates. +# Copyright (c) 2023 Intel and/or its affiliates. # Licensed 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: @@ -21,7 +21,7 @@ function gather_nginx () { # Ensure stable NGINX archive is downloaded. # # Variables read: - # - DOWNLOAD_DIR - Path to directory pybot takes the build to test from. + # - DOWNLOAD_DIR - Path to directory robot takes the build to test from. # - NGINX_VER - Version number of Nginx. set -exuo pipefail pushd "${DOWNLOAD_DIR}" || die "Pushd failed." @@ -53,7 +53,7 @@ function common_dirs () { # Variables set: # - BASH_FUNCTION_DIR - Path to existing directory this file is located in. # - CSIT_DIR - Path to CSIT framework. - # - DOWNLOAD_DIR - Path to directory pybot takes the build to test from. + # - DOWNLOAD_DIR - Path to directory robot takes the build to test from. # - NGINX_DIR - Path to NGINX framework. # - NGINX_VER - Version number of Nginx. # Functions called: @@ -121,7 +121,7 @@ function nginx_extract () { # Variables read: # - NGINX_DIR - Path to NGINX framework. # - CSIT_DIR - Path to CSIT framework. - # - DOWNLOAD_DIR - Path to directory pybot takes the build to test from. + # - DOWNLOAD_DIR - Path to directory robot takes the build to test from. # - NGINX_VER - Version number of Nginx. # Functions called: # - die - Print to stderr and exit. |