Skip to content

Commit

Permalink
MSVC regression-test job in CI now uses -include-std to workaround …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
bluetarpmedia authored Jan 17, 2024
1 parent ec19f91 commit c902f2b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion regression-tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ check_file () {
failure=1
else
# Compare the content with the reference value checked in git
diff_output=$(git diff --ignore-cr-at-eol -- "$file")
diff_output=$(git diff --ignore-cr-at-eol -I"\#define CPP2\_.*\_STD" -- "$file")
if [[ -n "$diff_output" ]]; then
echo " Non-matching $description:"
printf "\n$diff_output\n\n" | tee -a "$cxx_compiler-patch.diff"
Expand Down Expand Up @@ -163,6 +163,11 @@ for test_file in $tests; do
if [[ $test_name == "pure2"* ]]; then
descr="pure Cpp2 code"
opt="-p"
# Disable C++ modules with MSVC due to GitHub-hosted runner not supporting it
# See https://github.com/hsutter/cppfront/issues/943
if [[ "$cxx_compiler" == *"cl.exe"* ]]; then
opt="$opt -include-std"
fi
fi
echo " Testing $descr: $test_name.cpp2"

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1268118805
5558979605539197941
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sizeof(x) is 28
sizeof(x) is 40
(not a name)
xyz
42
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ plu
abr
3.14word-1500
first all() returned false
second all() returned true
second all() returned true
sum of (1, 2, 3, 100) is: 106

0 comments on commit c902f2b

Please sign in to comment.