From 2473014ab26cb63fc44543ae670609277fa94edf Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Tue, 20 Sep 2022 00:47:34 -0400 Subject: Run VPP 'make test' on Ubuntu 22.04 for master. - clean up build parameters Change-Id: I1c620f89eb59916620ae9e36dacf9368fb38e476 Signed-off-by: Dave Wallace --- jjb/global-macros.yaml | 8 ++++++++ jjb/scripts/vpp/build.sh | 41 +++++++++++++++++++++++++---------------- jjb/scripts/vpp/debug-build.sh | 19 ++++++++++++++++--- jjb/scripts/vpp/gcc-build.sh | 16 ++++++++++++---- jjb/vpp/vpp.yaml | 30 ++++++++++++++++++++++++++---- 5 files changed, 87 insertions(+), 27 deletions(-) diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index e0887571..ad10825b 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -48,6 +48,14 @@ default: '{make-test-os}' description: "The OS on which 'make test' is run." +- parameter: + name: make-test-multiworker-os-parameter + parameters: + - string: + name: MAKE_TEST_MULTIWORKER_OS + default: '{make-test-multiworker-os}' + description: "The OS on which 'make test' is run with multiple VPP workers." + - parameter: name: csit-fail-on-crc-mismatch-parameter parameters: diff --git a/jjb/scripts/vpp/build.sh b/jjb/scripts/vpp/build.sh index a06bbf96..3ee4748d 100644 --- a/jjb/scripts/vpp/build.sh +++ b/jjb/scripts/vpp/build.sh @@ -33,8 +33,8 @@ DRYRUN="${DRYRUN:-}" IS_CSIT_VPP_JOB="${IS_CSIT_VPP_JOB:-}" MAKE_PARALLEL_FLAGS="${MAKE_PARALLEL_FLAGS:-}" MAKE_PARALLEL_JOBS="${MAKE_PARALLEL_JOBS:-}" -MAKE_TEST_OS="${MAKE_TEST_OS:-ubuntu-18.04}" -MAKE_TEST_MULTIWORKER_OS="${MAKE_TEST_MULTIWORKER_OS:-debian-10}" +MAKE_TEST_OS="${MAKE_TEST_OS:-ubuntu-22.04}" +MAKE_TEST_MULTIWORKER_OS="${MAKE_TEST_MULTIWORKER_OS:-debian-11}" VPPAPIGEN_TEST_OS="${VPPAPIGEN_TEST_OS:-${MAKE_TEST_OS}}" BUILD_RESULT="SUCCESSFULLY COMPLETED" BUILD_ERROR="" @@ -76,10 +76,10 @@ make_build_test() { return fi if [ -n "${MAKE_PARALLEL_JOBS}" ] ; then - export TEST_JOBS="${MAKE_PARALLEL_JOBS}" + TEST_JOBS="${MAKE_PARALLEL_JOBS}" echo "Testing VPP with ${TEST_JOBS} cores." else - export TEST_JOBS="auto" + TEST_JOBS="auto" echo "Testing VPP with automatically calculated number of cores. " \ "See test logs for the exact number." fi @@ -90,26 +90,35 @@ make_build_test() { fi fi if [ "${OS_ID}-${OS_VERSION_ID}" == "${MAKE_TEST_OS}" ] ; then - if ! make COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test ; then + if ! make COMPRESS_FAILED_TEST_LOGS=yes TEST_JOBS="$TEST_JOBS" RETRIES=3 test ; then BUILD_ERROR="FAILED 'make test'" return fi else echo "Skip running 'make test' on ${OS_ID}-${OS_VERSION_ID}" fi - if [ "${OS_ID}-${OS_VERSION_ID}" == "${MAKE_TEST_MULTIWORKER_OS}" ] \ - && git grep -q VPP_WORKER_CONFIG ; then - if ! make VPP_WORKER_CONFIG="workers 2" COMPRESS_FAILED_TEST_LOGS=yes \ - RETRIES=3 test ; then - BUILD_ERROR="FAILED 'make test' with VPP_WORKER_CONFIG='workers 2'" - return + if [ "${OS_ID}-${OS_VERSION_ID}" == "${MAKE_TEST_MULTIWORKER_OS}" ] ; then + if git grep -q VPP_WORKER_CONFIG ; then + if ! make VPP_WORKER_CONFIG="workers 2" COMPRESS_FAILED_TEST_LOGS=yes \ + RETRIES=3 TEST_JOBS="$TEST_JOBS" test ; then + BUILD_ERROR="FAILED 'make test' with VPP_WORKER_CONFIG='workers 2'" + return + else + echo -e "\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^}" \ + "MULTIWORKER MAKE TEST SUCCESSFULLY COMPLETED\n" + fi + elif git grep -q VPP_WORKER_COUNT ; then + if ! make VPP_WORKER_COUNT="2" COMPRESS_FAILED_TEST_LOGS=yes \ + RETRIES=3 TEST_JOBS="$TEST_JOBS" test ; then + BUILD_ERROR="FAILED 'make test' with VPP_WORKER_CONFIG='workers 2'" + return + else + echo -e "\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^}" \ + "MULTIWORKER MAKE TEST SUCCESSFULLY COMPLETED\n" + fi else - echo -e "\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^}" \ - "MULTIWORKER MAKE TEST SUCCESSFULLY COMPLETED\n" + echo "Skip running MULTIWORKER MAKE TEST on ${OS_ID}-${OS_VERSION_ID}" fi - else - echo "Skip running 'make test' with VPP_WORKER_CONFIG='workers 2'" \ - "on ${OS_ID}-${OS_VERSION_ID}" fi } diff --git a/jjb/scripts/vpp/debug-build.sh b/jjb/scripts/vpp/debug-build.sh index 414a8116..ea742fb2 100644 --- a/jjb/scripts/vpp/debug-build.sh +++ b/jjb/scripts/vpp/debug-build.sh @@ -22,6 +22,7 @@ OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') OS_ARCH=$(uname -m) DRYRUN="${DRYRUN:-}" +MAKE_PARALLEL_JOBS="${MAKE_PARALLEL_JOBS:-}" BUILD_RESULT="SUCCESSFULLY COMPLETED" BUILD_ERROR="" RETVAL="0" @@ -47,9 +48,21 @@ make_build_test_debug() { BUILD_ERROR="FAILED 'make build'" return fi - if ! make UNATTENDED=yes TEST_JOBS=auto test-debug ; then - BUILD_ERROR="FAILED 'make test-debug'" - return + if [ "${OS_ID}-${OS_VERSION_ID}" == "${MAKE_TEST_OS}" ] ; then + if [ -n "${MAKE_PARALLEL_JOBS}" ] ; then + TEST_JOBS="${MAKE_PARALLEL_JOBS}" + echo "Testing VPP with ${TEST_JOBS} cores." + else + TEST_JOBS="auto" + echo "Testing VPP with automatically calculated number of cores. " \ + "See test logs for the exact number." + fi + if ! make UNATTENDED=yes TEST_JOBS="$TEST_JOBS" test-debug ; then + BUILD_ERROR="FAILED 'make UNATTENDED=yes TEST_JOBS=$TEST_JOBS test-debug'" + return + fi + else + echo "Skip running 'make test-debug' on ${OS_ID}-${OS_VERSION_ID}" fi } diff --git a/jjb/scripts/vpp/gcc-build.sh b/jjb/scripts/vpp/gcc-build.sh index 5afe739d..48877457 100644 --- a/jjb/scripts/vpp/gcc-build.sh +++ b/jjb/scripts/vpp/gcc-build.sh @@ -47,16 +47,24 @@ make_build_release_build_test_gcov_sanity() { BUILD_ERROR="FAILED 'make build'" return fi + if [ -n "${MAKE_PARALLEL_JOBS}" ] ; then + TEST_JOBS="${MAKE_PARALLEL_JOBS}" + echo "Testing VPP with ${TEST_JOBS} cores." + else + TEST_JOBS="auto" + echo "Testing VPP with automatically calculated number of cores. " \ + "See test logs for the exact number." + fi # TODO: Add 'smoke test' env var to select smoke test cases # then update this accordingly. For now pick a few basic suites... MAKE_TEST_SUITES="vlib vppinfra vpe_api vapi cli bihash" for suite in $MAKE_TEST_SUITES ; do - if ! make UNATTENDED=yes GCOV_TESTS=1 TEST_JOBS=auto TEST=$suite test ; then - BUILD_ERROR="FAILED 'make GCOV_TESTS=1 TEST_JOBS=auto TEST=$suite test'!" + if ! make UNATTENDED=yes TESTS_GCOV=1 TEST_JOBS="$TEST_JOBS" TEST=$suite test ; then + BUILD_ERROR="FAILED 'make TESTS_GCOV=1 TEST_JOBS=$TEST_JOBS TEST=$suite test'!" return fi - if ! make UNATTENDED=yes GCOV_TESTS=1 TEST_JOBS=auto TEST=$suite test-debug ; then - BUILD_ERROR="FAILED 'make GCOV_TESTS=1 TEST_JOBS=auto TEST=$suite test-debug'!" + if ! make UNATTENDED=yes TESTS_GCOV=1 TEST_JOBS="$TEST_JOBS" TEST=$suite test-debug ; then + BUILD_ERROR="FAILED 'make TESTS_GCOV=1 TEST_JOBS=$TEST_JOBS TEST=$suite test-debug'!" return fi done diff --git a/jjb/vpp/vpp.yaml b/jjb/vpp/vpp.yaml index 8db4db30..f355ca6d 100644 --- a/jjb/vpp/vpp.yaml +++ b/jjb/vpp/vpp.yaml @@ -81,20 +81,27 @@ - 'vpp-merge-{stream}-{os}-{executor-arch}' project: 'vpp' make-parallel-jobs: '4' - make-test-os: 'ubuntu-20.04' stream: - 'master': branch: 'master' branch-refspec: '' + make-test-os: 'ubuntu-22.04' + make-test-multiworker-os: 'debian-11' - '2202': branch: 'stable/2202' branch-refspec: '' + make-test-os: 'ubuntu-20.04' + make-test-multiworker-os: 'debian-11' - '2206': branch: 'stable/2206' branch-refspec: '' + make-test-os: 'ubuntu-20.04' + make-test-multiworker-os: 'debian-11' - '2210': branch: 'stable/2210' branch-refspec: '' + make-test-os: 'ubuntu-20.04' + make-test-multiworker-os: 'debian-11' os: - debian10 - debian11 @@ -102,6 +109,9 @@ - ubuntu2204 executor-arch: 'x86_64' exclude: + # os deprecated in 22.06 + - stream: '2206' + os: 'debian10' # os deprecated in 22.10 - stream: '2210' os: 'debian10' @@ -131,7 +141,7 @@ - 'vpp-debug-verify-{stream}-{os}-{executor-arch}' project: 'vpp' make-parallel-jobs: '4' - make-test-os: 'ubuntu-20.04' + make-test-os: 'ubuntu-22.04' comment-trigger-value: 'debug-verify' stream: - 'master': @@ -150,6 +160,7 @@ jobs: - 'vpp-gcc-verify-{stream}-{os}-{executor-arch}' project: 'vpp' + make-parallel-jobs: '4' os: - ubuntu2004 - ubuntu2204 @@ -197,21 +208,28 @@ - 'vpp-verify-{stream}-{os}-{executor-arch}' - 'vpp-merge-{stream}-{os}-{executor-arch}' project: 'vpp' - make-parallel-jobs: '16' - make-test-os: 'ubuntu-20.04' + make-parallel-jobs: '4' stream: - 'master': branch: 'master' branch-refspec: '' + make-test-os: 'ubuntu-22.04' + make-test-multiworker-os: '' - '2202': branch: 'stable/2202' branch-refspec: '' + make-test-os: 'ubuntu-20.04' + make-test-multiworker-os: '' - '2206': branch: 'stable/2206' branch-refspec: '' + make-test-os: 'ubuntu-20.04' + make-test-multiworker-os: '' - '2210': branch: 'stable/2210' branch-refspec: '' + make-test-os: 'ubuntu-20.04' + make-test-multiworker-os: '' os: - ubuntu2004 - ubuntu2204 @@ -496,6 +514,8 @@ make-parallel-jobs: '{make-parallel-jobs}' - make-test-os-parameter: make-test-os: '{make-test-os}' + - make-test-multiworker-os-parameter: + make-test-multiworker-os: '{make-test-multiworker-os}' - os-parameter: os: '{os}' - project-parameter: @@ -619,6 +639,8 @@ make-parallel-jobs: '{make-parallel-jobs}' - make-test-os-parameter: make-test-os: '{make-test-os}' + - make-test-multiworker-os-parameter: + make-test-multiworker-os: '{make-test-multiworker-os}' - os-parameter: os: '{os}' - project-parameter: -- cgit 1.2.3-korg