From 24d20bb20b634509369d387fbeaa8cff5c5140f0 Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Thu, 31 Mar 2022 22:55:27 +0900 Subject: [PATCH] Update automatic CI (#1454) --- .github/workflows/meson-ci.yml | 35 +++++++++++++++++++++++++++++++--- tests/core/timer-test.c | 2 +- tests/vonr/session-test.c | 3 +++ 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.github/workflows/meson-ci.yml b/.github/workflows/meson-ci.yml index 2db9ddfdf..f07699061 100644 --- a/.github/workflows/meson-ci.yml +++ b/.github/workflows/meson-ci.yml @@ -1,14 +1,42 @@ name: Meson Continuous Integration on: [push, pull_request] + jobs: macos-latest: name: Build and Test on MacOS Latest runs-on: macos-latest steps: + - name: Install MongoDB with Package Manager + run: | + brew tap mongodb/brew + brew install mongodb-community + brew services start mongodb-community + - name: Create the TUN device with the interface name `ogstun`. + run: | + sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.6 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.7 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.8 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.9 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.10 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.11 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.12 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.13 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.14 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.15 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.16 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.17 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.18 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.19 netmask 255.255.255.255 + sudo ifconfig lo0 alias 127.0.0.20 netmask 255.255.255.255 - name: Install the dependencies for building the source code. run: brew install mongo-c-driver libidn libmicrohttpd nghttp2 bison libusrsctp libtins talloc meson - name: Check out repository code - uses: actions/checkout@v1 + uses: actions/checkout@main - name: Setup Meson Build run: PATH="/usr/local/opt/bison/bin:$PATH" meson setup build env: @@ -16,7 +44,8 @@ jobs: - name : Build Open5GS run: ninja -C build - name: Test Open5GS - run: meson test -C build -v core crypt unit + run: sudo meson test -C build -v core crypt sctp unit + ubuntu-latest: name: Build and Test on Ubuntu Latest runs-on: ubuntu-latest @@ -37,7 +66,7 @@ jobs: sudo apt update sudo apt install python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev libtins-dev libtalloc-dev meson - name: Check out repository code - uses: actions/checkout@v1 + uses: actions/checkout@main - name: Setup Meson Build run: meson setup build env: diff --git a/tests/core/timer-test.c b/tests/core/timer-test.c index 455e000bf..3510c950c 100644 --- a/tests/core/timer-test.c +++ b/tests/core/timer-test.c @@ -25,7 +25,7 @@ #define TEST_DURATION 400000 static uint8_t expire_check[TEST_DURATION/TEST_TIMER_PRECISION]; -static ogs_time_t timer_duration[] = { 500000, 50000, 200000, 90000, 800000 }; +static ogs_time_t timer_duration[] = { 500000, 50000, 200000, 190000, 800000 }; void test_expire_func_1(void *data) { diff --git a/tests/vonr/session-test.c b/tests/vonr/session-test.c index f710e89a5..648572cb5 100644 --- a/tests/vonr/session-test.c +++ b/tests/vonr/session-test.c @@ -455,6 +455,9 @@ static void test1_func(abts_case *tc, void *data) rv = testgnb_ngap_send(ngap, sendbuf); ABTS_INT_EQUAL(tc, OGS_OK, rv); + /* Waiting for deleting PDU session */ + ogs_msleep(100); + /* Test Session Remove */ test_sess_remove(sess);