diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-28 07:24:16 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-28 15:32:58 +0100 |
| commit | 378dedcb38b85056991fecab24567414567724ec (patch) | |
| tree | 9d36e4e3980b8941ad7bcf92c3123434241ab89f /testsuite.py | |
| parent | 0fbb247a5e7cb1858d093b9e440b8200be3e0b55 (diff) | |
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().
Diffstat (limited to 'testsuite.py')
| -rw-r--r-- | testsuite.py | 10 |
1 files changed, 10 insertions, 0 deletions
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)) |
