Skip to content

Commit 39a0942

Browse files
committed
chore(diag): fix YAML — printf instead of heredoc
1 parent d2265cb commit 39a0942

1 file changed

Lines changed: 5 additions & 30 deletions

File tree

.github/workflows/diag-ut-macos.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,7 @@ jobs:
4444
echo "=== DYLD_PRINT_INITIALIZERS ==="
4545
DYLD_PRINT_INITIALIZERS=1 "$bin" 2>&1 | tail -100 || true
4646
echo "=== lldb deep ==="
47-
cat > ut.lldb <<'EOF'
48-
run
49-
bt
50-
register read pc sp x0
51-
disassemble --pc
52-
image lookup -rn "cout"
53-
image lookup -rn "DoIOSInit"
54-
image lookup -rn "start_std_streams"
55-
image lookup -rn "reporter_junit"
56-
EOF
47+
printf 'run\nbt\nregister read pc sp x0\ndisassemble --pc\nimage lookup -rn "cout"\nimage lookup -rn "DoIOSInit"\nimage lookup -rn "start_std_streams"\nimage lookup -rn "reporter_junit"\n' > ut.lldb
5748
lldb -b -s ut.lldb -- "$bin" 2>&1 | tail -250 || true
5849
echo "=== compile_commands (module build flags) ==="
5950
find tests/examples/boost-ext.ut -name 'compile_commands.json' -exec cat {} \; 2>/dev/null | head -80 || true
@@ -66,29 +57,13 @@ EOF
6657
clang=$(find "$HOME/.mcpp" tests/examples/boost-ext.ut/.mcpp -name 'clang++' -type f 2>/dev/null | head -1)
6758
echo "CLANG=$clang"
6859
mkdir -p /tmp/repro && cd /tmp/repro
69-
cat > mini.cppm <<'EOF'
70-
module;
71-
#include <iostream>
72-
export module mini;
73-
export inline int the_stream = (std::cout.rdbuf() != nullptr) ? 1 : 0;
74-
EOF
75-
cat > main.cpp <<'EOF'
76-
import mini;
77-
int main() { return std::cout.rdbuf() != nullptr ? 0 : 1; }
78-
EOF
79-
cat > main_importstd.cpp <<'EOF'
80-
import std;
81-
import mini;
82-
int main() { return std::cout.rdbuf() != nullptr ? 0 : 1; }
83-
EOF
60+
printf 'module;\n#include <iostream>\nexport module mini;\nexport inline int the_stream = (std::cout.rdbuf() != nullptr) ? 1 : 0;\n' > mini.cppm
61+
printf 'import mini;\nint main() { return std::cout.rdbuf() != nullptr ? 0 : 1; }\n' > main.cpp
62+
printf 'import std;\nimport mini;\nint main() { return std::cout.rdbuf() != nullptr ? 0 : 1; }\n' > main_importstd.cpp
8463
"$clang" -std=c++23 --precompile mini.cppm -o mini.pcm && \
8564
"$clang" -std=c++23 -fmodule-file=mini=mini.pcm main.cpp mini.pcm -o mini && \
8665
./mini; echo "mini(no import std) exit: $?"
8766
"$clang" -std=c++23 -fmodule-file=mini=mini.pcm main_importstd.cpp mini.pcm -o mini2 && \
8867
./mini2; echo "mini(import std) exit: $?"
89-
cat > header.cpp <<'EOF'
90-
#include <iostream>
91-
inline int h = (std::cout.rdbuf() != nullptr) ? 1 : 0;
92-
int main() { return std::cout.rdbuf() != nullptr ? 0 : 1; }
93-
EOF
68+
printf '#include <iostream>\ninline int h = (std::cout.rdbuf() != nullptr) ? 1 : 0;\nint main() { return std::cout.rdbuf() != nullptr ? 0 : 1; }\n' > header.cpp
9469
"$clang" -std=c++23 header.cpp -o header && ./header; echo "header-form exit: $?"

0 commit comments

Comments
 (0)