From 0e8d3a7528d32d0209849c60d5ed3848d4692ff6 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Mon, 24 Oct 2022 19:43:11 +0000 Subject: [PATCH] ci: disable the delay test, ci is ridiculously slow --- .github/workflows/ci.yml | 23 +++++++++++++++-------- tests/config/test_config.py | 15 ++++++++------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2d4179..2b9fa14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,29 +160,36 @@ jobs: mkdir -p output-buildroot/images/ mv rootfs.cpio.gz output-buildroot/images/ + - name: Print the environment under sudo + run: sudo -E env + - name: Config test run: | set -e - sudo python3 -m pytest -s tests/config | tee /tmp/unet-test/conf-results.txt - grep -v SKIPPED /tmp/unet-test/conf-results.txt + tmpf=/tmp/test-results-$$.txt + sudo -E env CI=$CI python3 -m pytest -s tests/config | tee $tmpf + grep -v SKIPPED $tmpf - name: Errors test run: | set -e - sudo python3 -m pytest -s tests/errors | tee /tmp/unet-test/errors-results.txt - grep -v SKIPPED /tmp/unet-test/errors-results.txt + tmpf=/tmp/test-results-$$.txt + sudo -E env CI=$CI python3 -m pytest -s tests/errors | tee $tmpf + grep -v SKIPPED $tmpf - name: Simple test run: | set -e - sudo python3 -m pytest -s tests/simplenet | tee /tmp/unet-test/simple-results.txt - grep -v SKIPPED /tmp/unet-test/simple-results.txt + tmpf=/tmp/test-results-$$.txt + sudo -E env CI=$CI python3 -m pytest -s tests/simplenet | tee $tmpf + grep -v SKIPPED $tmpf - name: UT packet test run: | set -e - sudo python3 -m pytest -s tests/utpkt | tee /tmp/unet-test/ut-results.txt - grep -v SKIPPED /tmp/unet-test/ut-results.txt + tmpf=/tmp/test-results-$$.txt + sudo python3 -m pytest -s tests/utpkt | tee $tmpf + grep -v SKIPPED $tmpf - name: Collect test logs if: ${{ always() }} diff --git a/tests/config/test_config.py b/tests/config/test_config.py index 06e55a7..349e908 100644 --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -70,13 +70,14 @@ async def test_config_combo(unet, astepf, psize, qsize, dtime, rewin, idelay, df await astepf("before ping") output = h1.cmd_raises("ping -c1 10.0.2.4") - # Measure the delay - m = re.search(r"time=(\d+(.\d+)?) ms", output) - # The CI test is experiencing 40ms RTT.. really horrible - if idelay: - assert 99 < float(m.group(1)) < 160.0 - else: - assert 0 < float(m.group(1)) < 60.0 + if not os.environ.get("CI"): + # Measure the delay + m = re.search(r"time=(\d+(.\d+)?) ms", output) + # The CI test is experiencing 40ms RTT.. really horrible + if idelay: + assert 99 < float(m.group(1)) < 160.0 + else: + assert 0 < float(m.group(1)) < 30.0 # # we can only test don't fragment with pkt-size # if psize: