test: drop transport runners (ssh/sshwin/wsl) and the Shell-quoting enum
All checks were successful
CI / build-test-release (pull_request) Successful in 9m56s
All checks were successful
CI / build-test-release (pull_request) Successful in 9m56s
With test.toml + ForTarget covering the cross-arch + Windows-on-Linux
cases, the env-var-driven transport runners are dead weight. This commit
removes them and the retired tests that exercised the env-var plumbing:
- TestRunner::Ssh / SshWin / Wsl factories and their copy/exec/cleanup
template machinery.
- TestRunner::Shell enum (Host/Sh/Cmd) and the ShellQuoteSh helper —
only Host shell quoting is needed once the remote shells are gone.
- TestRunner::copy / cleanup / remoteDir / argsShell fields.
- WindowsPathToWsl and the {remote_bundle}/{bin_win}/{bundle_wsl}
placeholder substitution in RunSingleTest's transport branch.
- ParseRunnerSpec narrowed from {local, cmd, ssh, sshwin, wsl} to
{local, cmd} — the override hatch is preserved, just simpler.
- tests/SshRunner, tests/WindowsViaSsh, tests/QemuUser: these tested
the CRAFTER_BUILD_RUNNER_<target> → runner plumbing that has been
replaced by ForTarget. The runner derivation is exercised every
time CrossArchAarch64 / Wasi / WindowsViaWine runs.
- tests/UnitLib: ssh/sshwin spec assertions become "throws on bogus
spec" assertions.
Refs issue #8.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
406a406420
commit
8de93aaf06
15 changed files with 35 additions and 516 deletions
|
|
@ -13,21 +13,15 @@ int main() {
|
|||
auto local = TestRunner::FromSpec("local");
|
||||
if (!local || local->name != "local") return 1;
|
||||
|
||||
auto ssh = TestRunner::FromSpec("ssh:somehost");
|
||||
if (!ssh || ssh->name != "ssh:somehost") return 1;
|
||||
|
||||
auto sshWithDir = TestRunner::FromSpec("ssh:somehost:/var/tmp/x");
|
||||
if (!sshWithDir || sshWithDir->remoteDir != "/var/tmp/x") return 1;
|
||||
|
||||
auto sshWin = TestRunner::FromSpec("sshwin:winhost");
|
||||
if (!sshWin || sshWin->name != "sshwin:winhost") return 1;
|
||||
|
||||
// Empty input returns nullopt; bogus prefix throws.
|
||||
// Empty input returns nullopt; anything else unrecognized throws.
|
||||
// ssh/sshwin/wsl used to be valid specs; they're now bogus (issue #8).
|
||||
if (TestRunner::FromSpec("")) return 1;
|
||||
try {
|
||||
TestRunner::FromSpec("nonsense:thing");
|
||||
return 1;
|
||||
} catch (const std::exception&) {}
|
||||
for (auto bogus : { "nonsense:thing", "ssh:somehost", "sshwin:winhost", "wsl" }) {
|
||||
try {
|
||||
TestRunner::FromSpec(bogus);
|
||||
return 1;
|
||||
} catch (const std::exception&) {}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue