Skip to content

test-arg-parser: skip download tests when network is unreachable (fix flaky CI) - #65

Merged
khosravipasha merged 1 commit into
prismfrom
fix/test-arg-parser-network-skip
Jul 14, 2026
Merged

test-arg-parser: skip download tests when network is unreachable (fix flaky CI)#65
khosravipasha merged 1 commit into
prismfrom
fix/test-arg-parser-network-skip

Conversation

@bri-prism

Copy link
Copy Markdown

What

test-arg-parser makes live HTTP requests to http://ggml.ai/ and asserts on the response (200 + body, 404, max-size error). On network-restricted CI runners (self-hosted, and the windows (x64-vulkan) job) the endpoint is unreachable, so the good-URL GET fails and the assert takes down the whole arg-parser suite on an unrelated connectivity issue.

This probes the endpoint once and asserts the download semantics only when it is actually reachable; otherwise it prints a notice and skips those sub-tests. No behavior change when the network is present (all download tests still run and assert).

Why

Seen failing on windows (x64-vulkan) (error: cannot make GET request) while the build itself succeeded — a flaky, environment-dependent failure unrelated to the code under test.

Test

Builds + runs locally with network present: all download tests execute and pass (test-arg-parser: all tests OK). With no network, they skip cleanly.

The download tests make live HTTP requests to http://ggml.ai/ and assert on
the response. Network-restricted CI runners (self-hosted, windows-vulkan)
can't reach it, so the good-URL GET fails and takes the whole arg-parser
suite down on an unrelated connectivity issue. Probe the endpoint once and
assert the download semantics only when it is actually reachable; otherwise
print a notice and skip. No behavior change when network is present.
Comment thread tests/test-arg-parser.cpp
assert(str.find("llama.cpp") != std::string::npos);
network_ok = true;
} else {
printf(" good URL returned %d, no usable network -- skipping download tests\n\n", res.first);

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Makes download-related argument parser tests skip when the remote endpoint is unreachable.

Changes:

  • Probes the good URL with exception handling.
  • Gates remaining download tests on probe success.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test-arg-parser.cpp
Comment on lines +194 to +200
if (res.first == 200 && res.second.size() > 0) {
std::string str(res.second.data(), res.second.size());
assert(str.find("llama.cpp") != std::string::npos);
network_ok = true;
} else {
printf(" good URL returned %d, no usable network -- skipping download tests\n\n", res.first);
}
@khosravipasha
khosravipasha merged commit 4b2f05a into prism Jul 14, 2026
12 of 29 checks passed
@khosravipasha
khosravipasha deleted the fix/test-arg-parser-network-skip branch July 14, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants