agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
Subject: [PATCH 01/23] cirrus/windows: add compiler_warnings_script
Date: Wed, 25 May 2022 21:53:22 -0500
I'm not sure how to write this test in windows shell; it's also not easy to
write it in posix sh, since windows shell is somehow interpretting && and ||...
https://www.postgresql.org/message-id/20220212212310.f645c6vw3njkgxka%40alap3.anarazel.de
See also: 8a1ce5e54f6d144e4f8e19af7c767b026ee0c956
ci-os-only: windows
https://cirrus-ci.com/task/6183879907213312
https://cirrus-ci.com/task/4876271443247104
---
.cirrus.yml | 14 +++++++++++++-
src/tools/ci/windows-compiler-warnings | 16 ++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100755 src/tools/ci/windows-compiler-warnings
diff --git a/.cirrus.yml b/.cirrus.yml
index 81eb8a9996d..2be62791448 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -370,7 +370,14 @@ task:
# ForceNoAlign prevents msbuild from introducing line-breaks for long lines
# disable file tracker, we're never going to rebuild, and it slows down the
# build
- MSBFLAGS: -m -verbosity:minimal "-consoleLoggerParameters:Summary;ForceNoAlign" /p:TrackFileAccess=false -nologo
+ # -fileLoggerParameters1: write warnings to msbuild.warn.log.
+ MSBFLAGS: >-
+ "-consoleLoggerParameters:Summary;ForceNoAlign"
+ -fileLoggerParameters1:warningsonly;logfile=msbuild.warn.log
+ -m
+ -nologo
+ -p:TrackFileAccess=false
+ -verbosity:minimal
# If tests hang forever, cirrus eventually times out. In that case log
# output etc is not uploaded, making the problem hard to debug. Of course
@@ -450,6 +457,11 @@ task:
cd src/tools/msvc
%T_C% perl vcregress.pl ecpgcheck
+ # These should be last, so all the important checks are always run
+ always:
+ compiler_warnings_script:
+ - sh src\tools\ci\windows-compiler-warnings msbuild.warn.log
+
on_failure:
<<: *on_failure
crashlog_artifacts:
diff --git a/src/tools/ci/windows-compiler-warnings b/src/tools/ci/windows-compiler-warnings
new file mode 100755
index 00000000000..d6f9a1fc569
--- /dev/null
+++ b/src/tools/ci/windows-compiler-warnings
@@ -0,0 +1,16 @@
+#! /bin/sh
+# Success if the given file doesn't exist or is empty, else fail
+# This is a separate file only to avoid dealing with windows shell quoting and escaping.
+set -e
+
+fn=$1
+
+if [ -s "$fn" ]
+then
+ # Display the file's content, then exit indicating failure
+ cat "$fn"
+ exit 1
+else
+ # Success
+ exit 0
+fi
--
2.17.1
--tKkaNMvYmhQvRCRK
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0002-cirrus-vcregress-test-modules-contrib-with-NO_INSTAL.patch"
view thread (21+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH 01/23] cirrus/windows: add compiler_warnings_script
In-Reply-To: <no-message-id-120886@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox