Skip to content

Windows: Skip 3 .sh 'compilable' tests depending on nm, if nm isn't in PATH - #23873

Merged
thewilsonator merged 6 commits into
dlang:masterfrom
kinke:test_win_nm
Sep 19, 2026
Merged

thewilsonator merged 6 commits into
dlang:masterfrom
kinke:test_win_nm

Conversation

@kinke

@kinke kinke commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Seems like the Windows CI runners have a compatible nm tool in PATH, so that we haven't seen any failures yet. But users might not have it (#23870 (comment)), so just skip these tests (but only on Windows) checking object-file symbols.

@kinke
kinke force-pushed the test_win_nm branch 2 times, most recently from 32da073 to 11b13b8 Compare September 17, 2026 23:36
obj_file="${RESULTS_TEST_DIR}/d/${TEST_NAME}_0${OBJ}"

# ensure no ModuleInfo or TypeInfo related code was generated
if ! nm "$1" | grep -q 'ModuleInfo\|_d_dso_registry\__start_minfo\|__stop_minfo\|TypeInfo' ; then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$1 is a path to a *.d.out file, apparently a text file containing the command-line for the earlier compiler run. So this verify_symbols.sh step was totally broken, just not failing because any nm error (incl. not in PATH) was ignored and treated as 'hey, the symbol is not there!'.

@0xEAB 0xEAB left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my Windows machine.

…n PATH

Seems like the Windows CI runners have a compatible `nm` tool in PATH,
so that we haven't seen any failures yet. But users might not have it,
so just skip these tests (but only on Windows) checking object-file
symbols.
Comment thread compiler/test/compilable/test19463.sh
@kinke
kinke marked this pull request as ready for review September 18, 2026 00:07
@kinke
kinke marked this pull request as draft September 18, 2026 13:58
@kinke
kinke marked this pull request as ready for review September 18, 2026 17:18
@thewilsonator
thewilsonator merged commit 638c501 into dlang:master Sep 19, 2026
42 checks passed
@kinke
kinke deleted the test_win_nm branch September 19, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants