summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-04-14 16:41:50 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-02-25 12:16:42 +0800
commit57396f56ed25ddca7442b7cbcfe468942b0049e2 (patch)
treefaccc9ff08ee6526e787d2cfe78b04b1cc2584e1
parentb803387bd256956a33af666d660473bf07584cfd (diff)
downloadgtk-doc-57396f56ed25ddca7442b7cbcfe468942b0049e2.tar.gz
test/helpers/*.py: Fix calling scripts on Windows
Shebang lines are not supported natively on Windows/cmd consoles, so help the test scripts by prepending the test command lines with the current Python interpreter on Windows.
-rw-r--r--tests/helpers/gtkdoc_check_runner.py7
-rw-r--r--tests/helpers/gtkdoc_fixxref_runner.py7
-rw-r--r--tests/helpers/gtkdoc_mkdb_runner.py7
-rw-r--r--tests/helpers/gtkdoc_mkhtml_runner.py7
-rw-r--r--tests/helpers/gtkdoc_scan_runner.py7
-rw-r--r--tests/helpers/gtkdoc_scangobj_runner.py7
6 files changed, 36 insertions, 6 deletions
diff --git a/tests/helpers/gtkdoc_check_runner.py b/tests/helpers/gtkdoc_check_runner.py
index 2b54c3c..73371f1 100644
--- a/tests/helpers/gtkdoc_check_runner.py
+++ b/tests/helpers/gtkdoc_check_runner.py
@@ -20,7 +20,12 @@ if __name__ == '__main__':
options, arguments = parser.parse_known_args()
- arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-check'))
+ arg_pos = 0
+ if os.name == 'nt':
+ arguments.insert(arg_pos, sys.executable)
+ arg_pos += 1
+
+ arguments.insert(arg_pos, os.path.join(options.binary_dir, 'gtkdoc-check'))
environ = os.environ.copy()
diff --git a/tests/helpers/gtkdoc_fixxref_runner.py b/tests/helpers/gtkdoc_fixxref_runner.py
index d3993bd..9f8ba47 100644
--- a/tests/helpers/gtkdoc_fixxref_runner.py
+++ b/tests/helpers/gtkdoc_fixxref_runner.py
@@ -18,7 +18,12 @@ if __name__ == '__main__':
options, arguments = parser.parse_known_args()
- arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-fixxref'))
+ arg_pos = 0
+ if os.name == 'nt':
+ arguments.insert(arg_pos, sys.executable)
+ arg_pos += 1
+
+ arguments.insert(arg_pos, os.path.join(options.binary_dir, 'gtkdoc-fixxref'))
if options.change_dir is not None:
if not os.path.exists(options.change_dir):
diff --git a/tests/helpers/gtkdoc_mkdb_runner.py b/tests/helpers/gtkdoc_mkdb_runner.py
index 0a0304f..bed6731 100644
--- a/tests/helpers/gtkdoc_mkdb_runner.py
+++ b/tests/helpers/gtkdoc_mkdb_runner.py
@@ -18,7 +18,12 @@ if __name__ == '__main__':
options, arguments = parser.parse_known_args()
- arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-mkdb'))
+ arg_pos = 0
+ if os.name == 'nt':
+ arguments.insert(arg_pos, sys.executable)
+ arg_pos += 1
+
+ arguments.insert(arg_pos, os.path.join(options.binary_dir, 'gtkdoc-mkdb'))
if options.change_dir is not None:
if not os.path.exists(options.change_dir):
diff --git a/tests/helpers/gtkdoc_mkhtml_runner.py b/tests/helpers/gtkdoc_mkhtml_runner.py
index 6641326..f5e61fc 100644
--- a/tests/helpers/gtkdoc_mkhtml_runner.py
+++ b/tests/helpers/gtkdoc_mkhtml_runner.py
@@ -21,7 +21,12 @@ if __name__ == '__main__':
options, arguments = parser.parse_known_args()
- arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-mkhtml'))
+ arg_pos = 0
+ if os.name == 'nt':
+ arguments.insert(arg_pos, sys.executable)
+ arg_pos += 1
+
+ arguments.insert(arg_pos, os.path.join(options.binary_dir, 'gtkdoc-mkhtml'))
if options.change_dir is not None:
if not os.path.exists(options.change_dir):
diff --git a/tests/helpers/gtkdoc_scan_runner.py b/tests/helpers/gtkdoc_scan_runner.py
index 7ba28d6..e46768f 100644
--- a/tests/helpers/gtkdoc_scan_runner.py
+++ b/tests/helpers/gtkdoc_scan_runner.py
@@ -18,7 +18,12 @@ if __name__ == '__main__':
options, arguments = parser.parse_known_args()
- arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-scan'))
+ arg_pos = 0
+ if os.name == 'nt':
+ arguments.insert(arg_pos, sys.executable)
+ arg_pos += 1
+
+ arguments.insert(arg_pos, os.path.join(options.binary_dir, 'gtkdoc-scan'))
if options.change_dir is not None:
if not os.path.exists(options.change_dir):
diff --git a/tests/helpers/gtkdoc_scangobj_runner.py b/tests/helpers/gtkdoc_scangobj_runner.py
index c3546f7..5bcf4b0 100644
--- a/tests/helpers/gtkdoc_scangobj_runner.py
+++ b/tests/helpers/gtkdoc_scangobj_runner.py
@@ -24,7 +24,12 @@ if __name__ == '__main__':
options, arguments = parser.parse_known_args()
- arguments.insert(0, os.path.join(options.binary_dir, 'gtkdoc-scangobj'))
+ arg_pos = 0
+ if os.name == 'nt':
+ arguments.insert(arg_pos, sys.executable)
+ arg_pos += 1
+
+ arguments.insert(arg_pos, os.path.join(options.binary_dir, 'gtkdoc-scangobj'))
process = Popen([options.pkg_config,
'--cflags'] + options.extra_pkg,