From 9340d9b6501af66b57f17b9d4157aa19eca52c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Mon, 11 Jul 2022 14:43:25 -0700 Subject: [PATCH] Rename travis_fold function to foldable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are no longer using Travis. As such, it is confusing to anyone reading the code to see a function prefixed 'travis_' in GitHub actions code. This change renames the travis_fold function to 'foldable', as a first step towards eliminating such confusing constructs from the repository where possible. Signed-off-by: Daniel Müller --- .../actions/build-selftests/build_selftests.sh | 4 ++-- .github/actions/build-selftests/helpers.sh | 2 +- travis-ci/vmtest/helpers.sh | 2 +- travis-ci/vmtest/run_selftests.sh | 18 +++++++++--------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/actions/build-selftests/build_selftests.sh b/.github/actions/build-selftests/build_selftests.sh index 7baca39..fa21d68 100755 --- a/.github/actions/build-selftests/build_selftests.sh +++ b/.github/actions/build-selftests/build_selftests.sh @@ -6,7 +6,7 @@ THISDIR="$(cd $(dirname $0) && pwd)" source ${THISDIR}/helpers.sh -travis_fold start prepare_selftests "Building selftests" +foldable start prepare_selftests "Building selftests" LLVM_VER=15 LIBBPF_PATH="${REPO_ROOT}" @@ -39,4 +39,4 @@ cd ${LIBBPF_PATH} rm selftests/bpf/.gitignore git add selftests -travis_fold end prepare_selftests +foldable end prepare_selftests diff --git a/.github/actions/build-selftests/helpers.sh b/.github/actions/build-selftests/helpers.sh index 856660a..08c307e 100644 --- a/.github/actions/build-selftests/helpers.sh +++ b/.github/actions/build-selftests/helpers.sh @@ -1,7 +1,7 @@ # $1 - start or end # $2 - fold identifier, no spaces # $3 - fold section description -travis_fold() { +foldable() { local YELLOW='\033[1;33m' local NOCOLOR='\033[0m' if [ -z ${GITHUB_WORKFLOW+x} ]; then diff --git a/travis-ci/vmtest/helpers.sh b/travis-ci/vmtest/helpers.sh index 856660a..08c307e 100755 --- a/travis-ci/vmtest/helpers.sh +++ b/travis-ci/vmtest/helpers.sh @@ -1,7 +1,7 @@ # $1 - start or end # $2 - fold identifier, no spaces # $3 - fold section description -travis_fold() { +foldable() { local YELLOW='\033[1;33m' local NOCOLOR='\033[0m' if [ -z ${GITHUB_WORKFLOW+x} ]; then diff --git a/travis-ci/vmtest/run_selftests.sh b/travis-ci/vmtest/run_selftests.sh index d1e8536..d5d44d1 100755 --- a/travis-ci/vmtest/run_selftests.sh +++ b/travis-ci/vmtest/run_selftests.sh @@ -18,36 +18,36 @@ read_lists() { test_progs() { if [[ "${KERNEL}" != '4.9.0' ]]; then - travis_fold start test_progs "Testing test_progs" + foldable start test_progs "Testing test_progs" # "&& true" does not change the return code (it is not executed # if the Python script fails), but it prevents exiting on a # failure due to the "set -e". ./test_progs ${BLACKLIST:+-d$BLACKLIST} ${WHITELIST:+-a$WHITELIST} && true echo "test_progs:$?" >> "${STATUS_FILE}" - travis_fold end test_progs + foldable end test_progs fi - travis_fold start test_progs-no_alu32 "Testing test_progs-no_alu32" + foldable start test_progs-no_alu32 "Testing test_progs-no_alu32" ./test_progs-no_alu32 ${BLACKLIST:+-d$BLACKLIST} ${WHITELIST:+-a$WHITELIST} && true echo "test_progs-no_alu32:$?" >> "${STATUS_FILE}" - travis_fold end test_progs-no_alu32 + foldable end test_progs-no_alu32 } test_maps() { - travis_fold start test_maps "Testing test_maps" + foldable start test_maps "Testing test_maps" ./test_maps && true echo "test_maps:$?" >> "${STATUS_FILE}" - travis_fold end test_maps + foldable end test_maps } test_verifier() { - travis_fold start test_verifier "Testing test_verifier" + foldable start test_verifier "Testing test_verifier" ./test_verifier && true echo "test_verifier:$?" >> "${STATUS_FILE}" - travis_fold end test_verifier + foldable end test_verifier } -travis_fold end vm_init +foldable end vm_init configs_path=${PROJECT_NAME}/vmtest/configs BLACKLIST=$(read_lists "$configs_path/blacklist/BLACKLIST-${KERNEL}" "$configs_path/blacklist/BLACKLIST-${KERNEL}.${ARCH}")