diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2021-02-08 13:25:17 +0000 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2021-02-10 17:57:06 +0000 |
commit | f4535bf07dcfafcf21d573c3ba5365a317c13295 (patch) | |
tree | c978120936e8f3651d83951e973a3fd69d2f1571 /jjb | |
parent | 4ed95452d982886c61e28c11f8737fdde207de69 (diff) |
vpp build.sh: move from "make verify" to "make pkg-verify" + "make test"
Problem: The VPP CI merge and verify jobs use the "make verify", which has
special handling depending on the OS. So, to make meaningful changes
like running the test suite on more platforms, one would need
to make the changes in two places, which is error-prone and slow.
Solution: move the logic on which OS to run the "make test" into
the ci-management scripts, and stop using "make verify"
Change-Id: Icc7daa9364198f455ed8ca5bae5e5da5f15baf48
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/scripts/vpp/build.sh | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/jjb/scripts/vpp/build.sh b/jjb/scripts/vpp/build.sh index 409061b4e..76aab8aa4 100644 --- a/jjb/scripts/vpp/build.sh +++ b/jjb/scripts/vpp/build.sh @@ -33,6 +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}" +VPPAPIGEN_TEST_OS="${VPPAPIGEN_TEST_OS:-${MAKE_TEST_OS}}" BUILD_RESULT="SUCCESSFULLY COMPLETED" BUILD_ERROR="" RETVAL="0" @@ -63,12 +65,24 @@ else "using build default ($(grep -c ^processor /proc/cpuinfo))." fi -# If we are not a CSIT job just building packages, then use make verify, -# else use make pkg-verify. -if [ "${IS_CSIT_VPP_JOB,,}" != "true" ] -then - if [ -n "${MAKE_PARALLEL_JOBS}" ] - then +make_build_test() { + if ! make UNATTENDED=yes install-dep ; then + BUILD_ERROR="FAILED 'make install-dep'" + return + fi + if ! make UNATTENDED=yes install-ext-deps ; then + BUILD_ERROR="FAILED 'make install-ext-deps'" + return + fi + if ! make UNATTENDED=yes pkg-verify ; then + BUILD_ERROR="FAILED 'make pkg-verify'" + return + fi + if [ "${IS_CSIT_VPP_JOB,,}" == "true" ]; then + # CSIT jobs don't need to run make test + return + fi + if [ -n "${MAKE_PARALLEL_JOBS}" ]; then export TEST_JOBS="${MAKE_PARALLEL_JOBS}" echo "Testing VPP with ${TEST_JOBS} cores." else @@ -76,19 +90,24 @@ then echo "Testing VPP with automatically calculated number of cores. " \ "See test logs for the exact number." fi - echo "Building using \"make verify\"" - if [[ "${DRYRUN,,}" != "true" ]] ; then - if ! make UNATTENDED=yes verify ; then - BUILD_ERROR="FAILED 'make verify'" - fi + if [ "${OS_ID}-${OS_VERSION_ID}" == "${VPPAPIGEN_TEST_OS}" ]; then + if ! src/tools/vppapigen/test_vppapigen.py; then + BUILD_ERROR="FAILED src/tools/vppapigen/test_vppapigen.py" + return + fi fi -else - echo "Building using \"make pkg-verify\"" - if [[ "${DRYRUN,,}" != "true" ]] ; then - if ! make UNATTENDED=yes pkg-verify ; then - BUILD_ERROR="FAILED 'make pkg-verify'" - fi + if [ "${OS_ID}-${OS_VERSION_ID}" == "${MAKE_TEST_OS}" ]; then + if ! make COMPRESS_FAILED_TEST_LOGS=yes 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 [ "${DRYRUN,,}" != "true" ] ; then + make_build_test fi if [ -n "$BUILD_ERROR" ] ; then BUILD_RESULT="$BUILD_ERROR" |