diff options
author | Jukka Laurila <jlaurila@google.com> | 2018-02-24 23:44:20 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-03-06 00:05:17 +0200 |
commit | 8f340ffb8db0eea74dcdb1068ee575d28d39dbb2 (patch) | |
tree | c6113d256a02a22e9e24f1e856616a29da3480e9 /run_unittests.py | |
parent | fcb95847edb05d900725923697974688ab1121bb (diff) | |
download | meson-8f340ffb8db0eea74dcdb1068ee575d28d39dbb2.zip meson-8f340ffb8db0eea74dcdb1068ee575d28d39dbb2.tar.gz meson-8f340ffb8db0eea74dcdb1068ee575d28d39dbb2.tar.bz2 |
Generate meson.build based on existing source files when meson init is run in a non-empty directory.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 3 |
1 files changed, 3 insertions, 0 deletions
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. |