[gtk-doc] meson: python cleanups for the test runners
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] meson: python cleanups for the test runners
- Date: Mon, 21 May 2018 18:32:23 +0000 (UTC)
commit 69661dfd5b32a395ca6395673d4eebc0422f5cd4
Author: Stefan Sauer <ensonic users sf net>
Date: Mon May 21 20:31:08 2018 +0200
meson: python cleanups for the test runners
Fix copy'n'paste for runner args. Make condition pythonic ('is not None').
tests/helpers/gtkdoc_check_runner.py | 6 +++---
tests/helpers/gtkdoc_fixxref_runner.py | 6 +++---
tests/helpers/gtkdoc_mkdb_runner.py | 6 +++---
tests/helpers/gtkdoc_mkhtml_runner.py | 8 ++++----
tests/helpers/gtkdoc_scan_runner.py | 6 +++---
tests/helpers/gtkdoc_scangobj_runner.py | 2 +-
6 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/tests/helpers/gtkdoc_check_runner.py b/tests/helpers/gtkdoc_check_runner.py
index e2d188b..2b54c3c 100644
--- a/tests/helpers/gtkdoc_check_runner.py
+++ b/tests/helpers/gtkdoc_check_runner.py
@@ -12,11 +12,11 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(description='gtkdoc-check runner.')
parser.add_argument("--binary-dir", type=str, required=True,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
parser.add_argument("--input-dir", type=str, required=True,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
parser.add_argument("--output-dir", type=str, required=True,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
options, arguments = parser.parse_known_args()
diff --git a/tests/helpers/gtkdoc_fixxref_runner.py b/tests/helpers/gtkdoc_fixxref_runner.py
index 7cb233b..d3993bd 100644
--- a/tests/helpers/gtkdoc_fixxref_runner.py
+++ b/tests/helpers/gtkdoc_fixxref_runner.py
@@ -12,15 +12,15 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(description='gtkdoc-fixxref runner.')
parser.add_argument("--binary-dir", type=str, required=True,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
parser.add_argument("--change-dir", type=str, default=None,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
options, arguments = parser.parse_known_args()
arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-fixxref'))
- if not options.change_dir is None:
+ if options.change_dir is not None:
if not os.path.exists(options.change_dir):
os.makedirs(options.change_dir)
diff --git a/tests/helpers/gtkdoc_mkdb_runner.py b/tests/helpers/gtkdoc_mkdb_runner.py
index 1e6983f..0a0304f 100644
--- a/tests/helpers/gtkdoc_mkdb_runner.py
+++ b/tests/helpers/gtkdoc_mkdb_runner.py
@@ -12,15 +12,15 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(description='gtkdoc-mkdb runner.')
parser.add_argument("--binary-dir", type=str, required=True,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
parser.add_argument("--change-dir", type=str, default=None,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
options, arguments = parser.parse_known_args()
arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-mkdb'))
- if not options.change_dir is None:
+ if options.change_dir is not None:
if not os.path.exists(options.change_dir):
os.makedirs(options.change_dir)
diff --git a/tests/helpers/gtkdoc_mkhtml_runner.py b/tests/helpers/gtkdoc_mkhtml_runner.py
index 2c48d7b..6641326 100644
--- a/tests/helpers/gtkdoc_mkhtml_runner.py
+++ b/tests/helpers/gtkdoc_mkhtml_runner.py
@@ -13,9 +13,9 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(description='gtkdoc-mkhtml runner.')
parser.add_argument("--binary-dir", type=str, required=True,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
parser.add_argument("--change-dir", type=str, default=None,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
parser.add_argument("--html-assets", type=str, default=None,
help='List of HTML assets, seprated by "@@"')
@@ -23,13 +23,13 @@ if __name__ == '__main__':
arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-mkhtml'))
- if not options.change_dir is None:
+ if options.change_dir is not None:
if not os.path.exists(options.change_dir):
os.makedirs(options.change_dir)
if not options.html_assets is None:
for html_asset in options.html_assets.split('@@'):
- if not options.change_dir is None:
+ if options.change_dir is not None:
html_target = os.path.join(options.change_dir, os.path.basename(html_asset))
else:
html_target = os.path.join(os.getcwd(), os.path.basename(html_asset))
diff --git a/tests/helpers/gtkdoc_scan_runner.py b/tests/helpers/gtkdoc_scan_runner.py
index c757ce8..7ba28d6 100644
--- a/tests/helpers/gtkdoc_scan_runner.py
+++ b/tests/helpers/gtkdoc_scan_runner.py
@@ -12,15 +12,15 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(description='gtkdoc-scan runner.')
parser.add_argument("--binary-dir", type=str, required=True,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
parser.add_argument("--change-dir", type=str, default=None,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
options, arguments = parser.parse_known_args()
arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-scan'))
- if not options.change_dir is None:
+ if options.change_dir is not None:
if not os.path.exists(options.change_dir):
os.makedirs(options.change_dir)
diff --git a/tests/helpers/gtkdoc_scangobj_runner.py b/tests/helpers/gtkdoc_scangobj_runner.py
index e01d027..b1005e6 100644
--- a/tests/helpers/gtkdoc_scangobj_runner.py
+++ b/tests/helpers/gtkdoc_scangobj_runner.py
@@ -12,7 +12,7 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser(description='gtkdoc-scangobj runner.')
parser.add_argument("--binary-dir", type=str, required=True,
- help='Path to the gtkdoc executables directory to be used')
+ help='Path to be used as a working directory')
parser.add_argument("--pkg-config", type=str, required=True,
help='Path to the pkg-config executable to be used')
parser.add_argument("--extra-pkg", type=str, default=[], action='append',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]