From: Magnus Jacobsson Date: Sat, 1 Jan 2022 18:15:21 +0000 (+0100) Subject: tests: define GVDLL to ensure correct storage-class attributes X-Git-Tag: 3.0.0~87^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed32f6bf8aefa0e3e1ebb66967118b7f4da022fc;p=graphviz tests: define GVDLL to ensure correct storage-class attributes An upcoming commit will change the storage-class attributes to be controlled by the GVDLL symbol in cgraph.h. Without this change, errors like this would occur when building the test examples: demo.obj : error LNK2019: unresolved external symbol Agdirected referenced in function main Towards https://gitlab.com/graphviz/graphviz/-/issues/2173. --- diff --git a/rtest/test_examples.py b/rtest/test_examples.py index ac8bb9dad..5395d431a 100644 --- a/rtest/test_examples.py +++ b/rtest/test_examples.py @@ -35,7 +35,12 @@ def test_compile_example(src): # run the example args = ["-Kneato"] if src in ["demo.c", "dot.c"] else [] - ret, out, err = run_c(filepath, args, "graph {a -- b}", link=libs) + if platform.system() == "Windows": + cflags = ["-DGVDLL"] + else: + cflags = None + + ret, out, err = run_c(filepath, args, "graph {a -- b}", cflags=cflags, link=libs) print(f"returncode: {ret} = 0x{ret:08x}") if ret != 0: