[m-rev.] diff: fixes for the bootcheck script on Windows
Julien Fischer
jfischer at opturion.com
Sun Jul 9 20:26:53 AEST 2023
Fixes for the bootcheck script on Windows.
tools/bootcheck:
Fix the setting of the WORKSPACE variable when running the tests.
Due to incorrect use of pwd it was actually pointing back at stage 1.
If we are running under MSYS2, then set --windows automatically.
(It's too easy to forget to do this otherwise.)
Mention this in the documentation for the --windows option. Also,
the --windows option does not imply anything about the library
extension -- despite what the usage message has claimed for many
years.
Julien.
diff --git a/tools/bootcheck b/tools/bootcheck
index 91c3914..9a17ab2 100755
--- a/tools/bootcheck
+++ b/tools/bootcheck
@@ -146,11 +146,11 @@ Options:
in modules compiled with debugging, and put the raw data needed
by the mct script into a bunch of files in the coverage directory.
-W, --windows
- Translate paths into the Microsoft Windows format and use the
- extension \`.lib' for libraries. This option also implies
- --no-sym-links.
+ Translate paths into the Microsoft Windows format. This is
+ automatically selected when using MSYS2.
+ This option also implies --no-sym-links.
--no-sym-links
- Use this option on systems which don't support symbolic links.
+ Use this option on systems which do not support symbolic links.
--disable-debug-libs
Make the trace, browser, ssdb libraries empty. This can be useful
when trying to track down the reason why they are being linked
@@ -626,14 +626,6 @@ else
LN_S="ln -s"
fi
-#-----------------------------------------------------------------------------#
-
-if ${windows}
-then
- CYGPATH='cygpath -m'
-else
- CYGPATH='echo'
-fi
#-----------------------------------------------------------------------------#
@@ -652,6 +644,7 @@ case "${MSYSTEM}" in
MINGW64|MINGW32|UCRT64|CLANG64)
env_is_msys2=true
+ windows=true
;;
CLANGARM64|MSYS)
@@ -666,6 +659,15 @@ esac
#-----------------------------------------------------------------------------#
+if ${windows}
+then
+ CYGPATH='cygpath -m'
+else
+ CYGPATH='echo'
+fi
+
+#-----------------------------------------------------------------------------#
+
# Turn off the debugger, since accidentally leaving it on will result
# in user interaction every time we invoke any version of the compiler
# that was compiled with tracing. This has happened to me accidentally
@@ -2022,7 +2024,7 @@ then
if "$env_is_msys2"
then
- WORKSPACE=$(pwd -W "${root}${stage2_insert}")
+ WORKSPACE=$($CYGPATH "${root}${stage2_insert}")
else
WORKSPACE="${root}${stage2_insert}"
fi
More information about the reviews
mailing list