diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-02-27 15:10:20 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-03-04 13:00:05 +0100 |
commit | 740f6b8f06f7d6d722ca16ca3d9d537a1f089b2f (patch) | |
tree | 6f47c36e1781270e347714b4c479e557c2811199 /run_unittests.py | |
parent | e72f535fc8205d4f273f6462b170c7189ae7bba1 (diff) | |
download | meson-740f6b8f06f7d6d722ca16ca3d9d537a1f089b2f.zip meson-740f6b8f06f7d6d722ca16ca3d9d537a1f089b2f.tar.gz meson-740f6b8f06f7d6d722ca16ca3d9d537a1f089b2f.tar.bz2 |
rewriter: Implemented a CLI
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py index 9c4d904..192b533 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -5196,7 +5196,7 @@ class RewriterTests(BasePlatformTests): def prime(self, dirname): copy_tree(os.path.join(self.rewrite_test_dir, dirname), self.builddir) - def rewrite(self, directory, args): + def rewrite_raw(self, directory, args): if isinstance(args, str): args = [args] command = self.rewrite_command + ['--sourcedir', directory] + args @@ -5209,6 +5209,11 @@ class RewriterTests(BasePlatformTests): raise subprocess.CalledProcessError(p.returncode, command, output=p.stdout) return p.stdout + def rewrite(self, directory, args): + if isinstance(args, str): + args = [args] + return self.rewrite_raw(directory, ['command'] + args) + def extract_test_data(self, out): match = RewriterTests.data_regex.match(out) result = {} |