Skip to content

Commit c902f2b

Browse files
MSVC regression-test job in CI now uses -include-std to workaround a problem with support for C++ modules (#944)
* Don't use C++ modules with MSVC CI job (see #943) * Ignore changes to CPP2_INCLUDE_STD or CPP2_IMPORT_STD (#943) * Update some MSVC test-results
1 parent ec19f91 commit c902f2b

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

regression-tests/run-tests.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ check_file () {
3939
failure=1
4040
else
4141
# Compare the content with the reference value checked in git
42-
diff_output=$(git diff --ignore-cr-at-eol -- "$file")
42+
diff_output=$(git diff --ignore-cr-at-eol -I"\#define CPP2\_.*\_STD" -- "$file")
4343
if [[ -n "$diff_output" ]]; then
4444
echo " Non-matching $description:"
4545
printf "\n$diff_output\n\n" | tee -a "$cxx_compiler-patch.diff"
@@ -163,6 +163,11 @@ for test_file in $tests; do
163163
if [[ $test_name == "pure2"* ]]; then
164164
descr="pure Cpp2 code"
165165
opt="-p"
166+
# Disable C++ modules with MSVC due to GitHub-hosted runner not supporting it
167+
# See https://github.com/hsutter/cppfront/issues/943
168+
if [[ "$cxx_compiler" == *"cl.exe"* ]]; then
169+
opt="$opt -include-std"
170+
fi
166171
fi
167172
echo " Testing $descr: $test_name.cpp2"
168173

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1268118805
1+
5558979605539197941
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sizeof(x) is 28
1+
sizeof(x) is 40
22
(not a name)
33
xyz
44
42

regression-tests/test-results/msvc-2022/pure2-variadics.cpp.execution

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ plu
33
abr
44
3.14word-1500
55
first all() returned false
6-
second all() returned true
6+
second all() returned true
7+
sum of (1, 2, 3, 100) is: 106

0 commit comments

Comments
 (0)