X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=jjb%2Fscripts%2Fvpp%2Fgcc-build.sh;h=1d8160047132d93081a44a5aef1d2a1d37233cb9;hb=dbbf75e41afb26dc12bb11176b1dcdc835383124;hp=488e8d7d7042f8876b3f0752278e316e4907ac9f;hpb=9a7179596459ba498f982f38195b3218c4c5b1c5;p=ci-management.git diff --git a/jjb/scripts/vpp/gcc-build.sh b/jjb/scripts/vpp/gcc-build.sh index 488e8d7d7..1d8160047 100644 --- a/jjb/scripts/vpp/gcc-build.sh +++ b/jjb/scripts/vpp/gcc-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2022 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: @@ -25,9 +25,6 @@ DRYRUN="${DRYRUN:-}" BUILD_RESULT="SUCCESSFULLY COMPLETED" BUILD_ERROR="" RETVAL="0" - -echo "sha1sum of this script: ${0}" -sha1sum $0 export CC=gcc make_build_release_build_test_gcov_sanity() { @@ -47,16 +44,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 vom bihash" + 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