summaryrefslogtreecommitdiff
path: root/run_meson_command_tests.py
diff options
context:
space:
mode:
authorAndrew McNulty <amcn102@gmail.com>2024-09-20 20:39:03 +0200
committerDylan Baker <dylan@pnwbakers.com>2024-09-23 09:17:49 -0700
commitbc30d5982d4f1e7650340bd189e1bb820ec2d7a8 (patch)
tree8637d37df01b422298968c1af61a2e13b1399394 /run_meson_command_tests.py
parent5102f436576b873ab5b2042179af9b1b824f0b39 (diff)
downloadmeson-bc30d5982d4f1e7650340bd189e1bb820ec2d7a8.tar.gz
meson command tests: clean up temporary script upon completion
Diffstat (limited to 'run_meson_command_tests.py')
-rwxr-xr-xrun_meson_command_tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/run_meson_command_tests.py b/run_meson_command_tests.py
index d405a5b87..f9faca9af 100755
--- a/run_meson_command_tests.py
+++ b/run_meson_command_tests.py
@@ -206,13 +206,13 @@ class CommandTests(unittest.TestCase):
with open(script_file, 'w') as f:
f.write('#!/usr/bin/env python3\n\n')
f.write(f'{test_command}\n')
+ self.addCleanup(os.remove, script_file)
for cmd in [['-c', test_command, 'fake argument'], [script_file, 'fake argument']]:
pyout = self._run(python_command + cmd)
mesonout = self._run(python_command + [meson_command, 'runpython'] + cmd, env=env)
self.assertEqual(pyout, mesonout)
-
if __name__ == '__main__':
print('Meson build system', meson_version, 'Command Tests')
raise SystemExit(unittest.main(buffer=True))