Skip to content

Commit

Permalink
OVN-CI: ovn unit tests run in parallel jobs.
Browse files Browse the repository at this point in the history
Ovn unit tests supported matrix size has been increased
after adding support to monitor_all and northd_parallelization
options recently, and that increased the execution time of the ovn-ci jobs.

This patch aims to reduce the execution time of those jobs by splitting
them into smaller jobs that runs in parallel and each one will execute
a subset of unit test.

Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2114862
Signed-off-by: Mohammad Heib <mheib@redhat.com>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry picked from commit d093905)
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
mohammadheib authored and dceara committed Oct 21, 2022
1 parent ad82452 commit e058edc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
9 changes: 7 additions & 2 deletions .ci/linux-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ else
fi

if [ "$TESTSUITE" ]; then
TESTSUITEFLAGS=""
if [[ ! -z $TESTSUITE_KW ]]; then
TESTSUITEFLAGS="-k $TESTSUITE_KW"
fi

if [ "$TESTSUITE" = "system-test" ]; then
configure_ovn $OPTS
make -j4 || { cat config.log; exit 1; }
if ! sudo make -j4 check-kernel RECHECK=yes; then
if ! sudo make -j4 check-kernel TESTSUITEFLAGS="$TESTSUITEFLAGS" RECHECK=yes; then
# system-kmod-testsuite.log is necessary for debugging.
cat tests/system-kmod-testsuite.log
exit 1
Expand All @@ -62,7 +67,7 @@ if [ "$TESTSUITE" ]; then

export DISTCHECK_CONFIGURE_FLAGS="$OPTS"
if ! make distcheck CFLAGS="${COMMON_CFLAGS} ${OVN_CFLAGS}" -j4 \
TESTSUITEFLAGS="-j4" RECHECK=yes
TESTSUITEFLAGS="$TESTSUITEFLAGS -j4" RECHECK=yes
then
# testsuite.log is necessary for debugging.
cat */_build/sub/tests/testsuite.log
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
M32: ${{ matrix.cfg.m32 }}
OPTS: ${{ matrix.cfg.opts }}
TESTSUITE: ${{ matrix.cfg.testsuite }}
TESTSUITE_KW: ${{ matrix.cfg.testsuite_kw }}
SANITIZERS: ${{ matrix.cfg.sanitizers }}

name: linux ${{ join(matrix.cfg.*, ' ') }}
Expand All @@ -31,11 +32,26 @@ jobs:
cfg:
- { compiler: gcc, opts: --disable-ssl }
- { compiler: clang, opts: --disable-ssl }
- { compiler: gcc, testsuite: test }
- { compiler: gcc, testsuite: system-test }
- { compiler: clang, testsuite: test, sanitizers: sanitizers }
- { compiler: gcc, testsuite: test, libs: -ljemalloc }
- { compiler: clang, testsuite: test, libs: -ljemalloc }
- { compiler: gcc, testsuite: test, testsuite_kw: "parallelization=yes,ovn_monitor_all=yes" }
- { compiler: gcc, testsuite: test, testsuite_kw: "parallelization=yes,ovn_monitor_all=no" }
- { compiler: gcc, testsuite: test, testsuite_kw: "parallelization=no,ovn_monitor_all=yes" }
- { compiler: gcc, testsuite: test, testsuite_kw: "parallelization=no,ovn_monitor_all=no" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, testsuite_kw: "parallelization=yes,ovn_monitor_all=yes" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, testsuite_kw: "parallelization=yes,ovn_monitor_all=no" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, testsuite_kw: "parallelization=no,ovn_monitor_all=yes" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, testsuite_kw: "parallelization=no,ovn_monitor_all=no" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, testsuite_kw: "parallelization=yes,ovn_monitor_all=yes" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, testsuite_kw: "parallelization=yes,ovn_monitor_all=no" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, testsuite_kw: "parallelization=no,ovn_monitor_all=yes" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, testsuite_kw: "parallelization=no,ovn_monitor_all=no" }
- { compiler: clang, testsuite: test, libs: -ljemalloc, testsuite_kw: "parallelization=yes,ovn_monitor_all=yes" }
- { compiler: clang, testsuite: test, libs: -ljemalloc, testsuite_kw: "parallelization=yes,ovn_monitor_all=no" }
- { compiler: clang, testsuite: test, libs: -ljemalloc, testsuite_kw: "parallelization=no,ovn_monitor_all=yes" }
- { compiler: clang, testsuite: test, libs: -ljemalloc, testsuite_kw: "parallelization=no,ovn_monitor_all=no" }
- { compiler: gcc, testsuite: system-test, testsuite_kw: "parallelization=yes,ovn_monitor_all=yes" }
- { compiler: gcc, testsuite: system-test, testsuite_kw: "parallelization=yes,ovn_monitor_all=no" }
- { compiler: gcc, testsuite: system-test, testsuite_kw: "parallelization=no,ovn_monitor_all=yes" }
- { compiler: gcc, testsuite: system-test, testsuite_kw: "parallelization=no,ovn_monitor_all=no" }
- { compiler: gcc, m32: m32, opts: --disable-ssl}

steps:
Expand Down

0 comments on commit e058edc

Please sign in to comment.