]> git.proxmox.com Git - mirror_frr.git/commitdiff
tests: Avoid top ecmp route_scale test case when memory limited
authorMark Stapp <mjs@voltanet.io>
Wed, 29 Jul 2020 20:57:37 +0000 (16:57 -0400)
committerMark Stapp <mjs@voltanet.io>
Thu, 30 Jul 2020 18:23:52 +0000 (14:23 -0400)
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 <mjs@voltanet.io>
tests/topotests/route-scale/test_route_scale.py

index ba5c82c281da43de41eb4980cc0da67419b8c88e..508d1746b3f523089b4a9c72ecaa211526d3bf14 100755 (executable)
@@ -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)