From: Mark Stapp Date: Wed, 29 Jul 2020 20:57:37 +0000 (-0400) Subject: tests: Avoid top ecmp route_scale test case when memory limited X-Git-Tag: frr-7.5.1~204^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=76e036e4b021588ce364a94d474970564b2cce63;p=mirror_frr.git tests: Avoid top ecmp route_scale test case when memory limited Address-sanitizer runs in the CI appear to require more memory than is available (at present), so skip the top x32 route_scale testcase when running with <4G of ram. Signed-off-by: Mark Stapp --- diff --git a/tests/topotests/route-scale/test_route_scale.py b/tests/topotests/route-scale/test_route_scale.py index ba5c82c28..508d1746b 100755 --- a/tests/topotests/route-scale/test_route_scale.py +++ b/tests/topotests/route-scale/test_route_scale.py @@ -154,6 +154,8 @@ def test_route_install(): if tgen.routers_have_failure(): pytest.skip(tgen.errors) + r1 = tgen.gears["r1"] + installed_file = "{}/r1/installed.routes.json".format(CWD) expected_installed = json.loads(open(installed_file).read()) @@ -188,9 +190,15 @@ def test_route_install(): scale_setups.append(d) - # Run each step using the dicts we've built - r1 = tgen.gears["r1"] + # Avoid top ecmp case for runs with < 4G memory + p = os.popen('free') + l = p.readlines()[1].split() + mem = int(l[1]) + if mem < 4000000: + logger.info('Limited memory available: {}, skipping x32 testcase'.format(mem)) + scale_setups = scale_setups[0:-1] + # Run each step using the dicts we've built for s in scale_setups: run_one_setup(r1, s)