Skip to content

Cross-platform test tooling + WSL1/WSL2 + Ubuntu 22.04 support - #9

Merged
darkn3rd merged 46 commits into
masterfrom
ubuntu26_wine
Aug 9, 2026
Merged

Cross-platform test tooling + WSL1/WSL2 + Ubuntu 22.04 support#9
darkn3rd merged 46 commits into
masterfrom
ubuntu26_wine

Conversation

@darkn3rd

@darkn3rd darkn3rd commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a cross-platform verification and test-harness toolchain for
script-tut's lessons, and extends platform support to WSL1, WSL2, and
native Ubuntu 22.04, alongside a round of correctness fixes surfaced by
testing across all of them.

New tooling (scriptbox/scripts/)

  • verify_commands.rb - reports every lesson language's resolved
    binary, package identity, and version across MSYS2/Cygwin/WSL1/WSL2/
    native Windows/macOS, with table/json/yaml/csv output.
  • run_all_tests.rb / run_all_tests.ps1 - drives rake/psake
    across every lesson directory and prints a unified pass/fail/skip
    summary, with table/json/yaml/csv/junit output and
    {a,b,c}-style area/language selectors.
  • compile_check.rb - builds every compiled-language lesson
    (C++/C#/Go/Java/Rust) in parallel and reports success/failure per
    language.
  • A --skip-compile flag / TESTBOX_SKIP_COMPILE env var lets
    run_all_tests reuse a build compile_check.rb already did instead
    of rebuilding sequentially.

Platform support

  • New Wsl2ShellScript (testbox/Script.rb) - WSL2 now gets the same
    wslpath-based Windows-binary invocation WSL1 already had, for
    win_scripts (Batch/JScript/VBScript) lessons.
  • windows_host_shell's process-ancestry walk now sees past any
    intermediary process, not just a transient cmd.exe /c wrapper -
    fixes run_all_tests.rb always selecting the wrong shell class
    (and the long-standing PowerShell-lesson hang that turned out to be
    a symptom of it).
  • TestBox.psm1's cmd/cscript resolution now works under WSL
    interop, not just native Windows (PATHEXT-based bare-name resolution
    is Windows-only; WSL needs the .exe extension explicit).
  • Added scriptbox/config/ubuntu2204.yml and
    scriptbox/config/wsl1_ubuntu2604.yml for unattended provisioning.

Bug fixes

  • ensure_compiled!/Confirm-TestBoxCompiled now run make clean
    first and correctly select Makefile.win on native Windows
    (matching compile_check.rb, which already did) - fixes stale
    cross-environment build artifacts breaking links.
  • All 5 lessons/compiled_lang/*/Makefiles: clean:'s mkdir -p
    created a literal -p directory under a cmd.exe recipe shell (no
    -p support there) - fixed to the portable -@mkdir idiom already
    used elsewhere in the same files. That stray directory was also
    silently corrupting -?/-h argument parsing on MinGW-built C++
    binaries via argv glob-expansion.
  • Version-parsing fixes across gawk, g++, mksh, groovy, dash, ksh93;
    Debian/dpkg packaging noise (+git..., ~beta.N, -revision)
    stripped from displayed versions.
  • find_on_path now tries PATHEXT extensions when searching an
    explicit directory list (fixes false "MISSING" for Batch's
    date/grep dependents under WSL).
  • Native Windows no longer misidentifies C:\Windows\System32\bash.exe
    (WSL's own launcher stub) as a real bash.

Lessons

  • Added lessons/compiled_lang/cpp/src/d10.input.cpp (C++ had no D1
    "Reading a Single Character" implementation at all).
  • Various lesson cleanup/reorganization across posix, bash,
    wsh.vbscript, win_scripts (scratch/deceased pruning, a few new
    variants).

Test plan

  • verify_commands.rb and run_all_tests.rb/.ps1 run clean on
    native Windows (PowerShell/cmd), WSL1, and WSL2
  • compile_check.rb parallel build verified on native Windows and
    WSL2
  • All 5 compiled-language lesson suites pass with zero skips
    (C++ included, after adding D1)
  • --skip-compile verified to skip rebuild on both rake and
    psake paths

Joaquin Menchaca and others added 30 commits August 2, 2026 02:03
fix: fix parsing %date% on windows and wine environments

@darkn3rd darkn3rd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

@darkn3rd darkn3rd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

@darkn3rd
darkn3rd merged commit c1e938c into master Aug 9, 2026
22 checks passed
@darkn3rd
darkn3rd deleted the ubuntu26_wine branch August 9, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant