aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-04-17 11:31:23 -0400
committerEli Schwartz <eschwartz93@gmail.com>2021-04-17 22:54:03 -0400
commitd9b9eecd5464a1bd2c95778aa029d9e984fe3b9f (patch)
treee5cc987c11d919104f09128431dd1caaf7030deb
parentb3a76fea64a18bc6888b13430f679f7f4e2c706d (diff)
downloadmeson-d9b9eecd5464a1bd2c95778aa029d9e984fe3b9f.zip
meson-d9b9eecd5464a1bd2c95778aa029d9e984fe3b9f.tar.gz
meson-d9b9eecd5464a1bd2c95778aa029d9e984fe3b9f.tar.bz2
msetup: Restore .gitignore after wipe
-rw-r--r--mesonbuild/msetup.py1
-rwxr-xr-xrun_unittests.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py
index 5c7bb17..b348948 100644
--- a/mesonbuild/msetup.py
+++ b/mesonbuild/msetup.py
@@ -101,6 +101,7 @@ class MesonApp:
else:
mesonlib.windows_proof_rm(l)
finally:
+ self.add_vcs_ignore_files(self.build_dir)
for b, f in restore:
os.makedirs(os.path.dirname(f), exist_ok=True)
shutil.move(b, f)
diff --git a/run_unittests.py b/run_unittests.py
index e9711db..2a2fb4c 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -4337,6 +4337,7 @@ class AllPlatformTests(BasePlatformTests):
self.assertRegex(out, 'opt2 val2')
self.assertRegex(out, 'opt3 val3')
self.assertRegex(out, 'opt4 val4')
+ self.assertTrue(Path(self.builddir, '.gitignore').exists())
self.build()
self.run_tests()