From 8f340ffb8db0eea74dcdb1068ee575d28d39dbb2 Mon Sep 17 00:00:00 2001 From: Jukka Laurila Date: Sat, 24 Feb 2018 23:44:20 +0100 Subject: Generate meson.build based on existing source files when meson init is run in a non-empty directory. --- run_unittests.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index c2299ca..f45f65e 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1775,6 +1775,9 @@ int main(int argc, char **argv) { workdir=tmpdir) self._run(ninja, workdir=os.path.join(tmpdir, 'builddir')) + with tempfile.TemporaryDirectory() as tmpdir: + open(os.path.join(tmpdir, 'foo.' + lang), 'w').write('int main() {}') + self._run(meson_command + ['init', '-b'], workdir=tmpdir) # The test uses mocking and thus requires that # the current process is the one to run the Meson steps. -- cgit v1.1