Skip to content

MSVC regression-test job in CI now uses -include-std to workaround a problem with support for C++ modules #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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