From 378dedcb38b85056991fecab24567414567724ec Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Wed, 28 Feb 2018 07:24:16 +0100 Subject: Add support for incremental builds Implement a scheme from the C tools where symbols get corresponding files that are touch'ed whenever the symbol's value changes. This can be used to add e.g. Makefile dependencies between source files and particular symbols. See the docstring of the new sync_deps() function for more information. Piggyback a small sanity check for write_autoconf(). --- testsuite.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testsuite.py') diff --git a/testsuite.py b/testsuite.py index da96075..db1b5f0 100644 --- a/testsuite.py +++ b/testsuite.py @@ -47,8 +47,10 @@ import errno import os import platform import re +import shutil import subprocess import sys +import tempfile import textwrap import time @@ -1851,6 +1853,14 @@ def test_sanity(conf, arch, srcarch): conf.mainmenu_text conf.unset_values() + conf.write_autoconf("/dev/null") + + # No tempfile.TemporaryDirectory in Python 2 + tmpdir = tempfile.mkdtemp() + conf.sync_deps(os.path.join(tmpdir, "deps")) # Create + conf.sync_deps(os.path.join(tmpdir, "deps")) # Update + shutil.rmtree(tmpdir) + # Python 2/3 compatible for key, sym in conf.syms.items(): verify(isinstance(key, str), "weird key '{}' in syms dict".format(key)) -- cgit v1.2.3