From c56c7bcd74b11eda19f8b56c6c7671a638109725 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Mon, 9 Jan 2023 17:26:32 -0700 Subject: [PATCH] Add script to check for Windows, use it to skip sphinx test The Sphinx scripts need to be updated in much of the same ways that btest was updated in order to run internal subprocesses and whatnot. --- btest | 4 ++++ testing/Scripts/is-not-windows | 13 +++++++++++++ testing/tests/sphinx/run-sphinx | 1 + 3 files changed, 18 insertions(+) create mode 100644 testing/Scripts/is-not-windows diff --git a/btest b/btest index bcdfd2a4..789c2022 100755 --- a/btest +++ b/btest @@ -2227,6 +2227,10 @@ def create_output_handler(options): print("cannot open %s: %s" % (options.diagfile, e), file=sys.stderr) if options.sphinx: + if sys.platform == 'win32': + print("Sphinx support is disabled on Windows", file=sys.stderr) + sys.exit(1) + output_handlers += [SphinxOutput(options)] if options.xmlfile: diff --git a/testing/Scripts/is-not-windows b/testing/Scripts/is-not-windows new file mode 100644 index 00000000..1a410875 --- /dev/null +++ b/testing/Scripts/is-not-windows @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +case "$OSTYPE" in + msys*) + exit 1 + ;; + cygwin*) + exit 1 + ;; + *) + exit 0 + ;; +esac diff --git a/testing/tests/sphinx/run-sphinx b/testing/tests/sphinx/run-sphinx index 765594fd..a4483e73 100644 --- a/testing/tests/sphinx/run-sphinx +++ b/testing/tests/sphinx/run-sphinx @@ -1,4 +1,5 @@ # %TEST-REQUIRES: which sphinx-build +# %TEST-REQUIRES: ${SCRIPTS}/is-not-windows # # %TEST-EXEC: cp -r %DIR/../../../examples/sphinx/* . # %TEST-EXEC: make clean && make text