From b106c6cb4de5903feff25f87d0543d94cce01749 Mon Sep 17 00:00:00 2001 From: Brian Martin Date: Tue, 26 Oct 2021 12:14:13 -0700 Subject: [PATCH] Squashed 'deps/ccommon/' changes from 9caf864d..cc7b9fc5 cc7b9fc5 increase tick interval for cc_wheel tests (#255) 9a3255dd Delete flaky assert within check_pipe (#254) git-subtree-dir: deps/ccommon git-subtree-split: cc7b9fc5497347c911574f9a761317e300954f8f --- .github/workflows/cmake.yml | 35 ++++++++++++++++++++++++++++++++++ test/channel/pipe/check_pipe.c | 1 - test/time/wheel/check_wheel.c | 4 ++-- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 000000000..072f7ae29 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,35 @@ +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: full + +jobs: + build: + strategy: + matrix: + os: [ ubuntu-18.04, macos-10.15 ] + profile: [ Release ] + name: build-${{ matrix.os }}-${{ matrix.profile }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Configure + run: | + mkdir -p _build + cmake -B _build -S . \ + -DCMAKE_BUILD_TYPE=${{ matrix.profile }} \ + -DBUILD_AND_INSTALL_CHECK=yes + + - name: Build + run: | + cmake --build _build + + - name: Test + run: | + cmake --build _build --target test + env: + CTEST_OUTPUT_ON_FAILURE: 1 diff --git a/test/channel/pipe/check_pipe.c b/test/channel/pipe/check_pipe.c index 5192119e2..58cb977a1 100644 --- a/test/channel/pipe/check_pipe.c +++ b/test/channel/pipe/check_pipe.c @@ -128,7 +128,6 @@ START_TEST(test_read_blocking) pthread_join(thread, NULL); ck_assert_int_ge(duration_us(&duration), SLEEP_TIME - TOLERANCE_UNDER); - ck_assert_int_le(duration_us(&duration), SLEEP_TIME + TOLERANCE_OVER); ck_assert_str_eq(write_message, read_message); diff --git a/test/time/wheel/check_wheel.c b/test/time/wheel/check_wheel.c index 177eb0008..2ac01c6a2 100644 --- a/test/time/wheel/check_wheel.c +++ b/test/time/wheel/check_wheel.c @@ -42,7 +42,7 @@ _incr_cb(void *v) START_TEST(test_timing_wheel_basic) { -#define TICK_NS 1000000 +#define TICK_NS 100000000 #define NSLOT 3 #define NTICK 2 @@ -182,7 +182,7 @@ END_TEST START_TEST(test_timing_wheel_edge_case) { -#define TICK_NS 1000000 +#define TICK_NS 100000000 #define NSLOT 3 #define NTICK 2