unsloth/tests/sh
Daniel Han c87fe20e32
Some checks are pending
Core / Core (HF=default + TRL=default) (push) Waiting to run
Local Agent Guides CI / connection (codex) (push) Waiting to run
Local Agent Guides CI / connection (openclaw) (push) Waiting to run
Local Agent Guides CI / connection (opencode) (push) Waiting to run
Local Agent Guides CI / file-edit (codex) (push) Waiting to run
Local Agent Guides CI / file-edit (openclaw) (push) Waiting to run
Local Agent Guides CI / file-edit (pi) (push) Waiting to run
Local Agent Guides CI / resume (claude) (push) Waiting to run
Local Agent Guides CI / resume (codex) (push) Waiting to run
Local Agent Guides CI / resume (opencode) (push) Waiting to run
Local Agent Guides CI / resume (pi) (push) Waiting to run
Local Agent Guides CI / prompt-cache (gemma-3-270m) (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Security audit / advisory audit (pip + npm + cargo) (push) Waiting to run
Security audit / pip scan-packages :: extras (push) Waiting to run
Security audit / pip scan-packages :: studio (push) Waiting to run
Security audit / pip scan-packages :: hf-stack (push) Waiting to run
Security audit / npm scan-packages (Unsloth frontend tarballs) (push) Waiting to run
Security audit / pytest tests/security (push) Waiting to run
Security audit / npm provenance + new install-script diff (push) Waiting to run
Unsloth API CI / Unsloth API & Auth Tests (push) Waiting to run
Backend CI / (Python 3.10) (push) Waiting to run
Backend CI / (Python 3.11) (push) Waiting to run
Backend CI / (Python 3.12) (push) Waiting to run
Backend CI / (Python 3.13) (push) Waiting to run
Backend CI / Repo tests (CPU) (push) Waiting to run
Unsloth export capability / capability (ubuntu-latest) (push) Waiting to run
Unsloth export capability / capability (windows-latest) (push) Waiting to run
Frontend CI / Frontend build + bundle sanity (push) Waiting to run
Core / Core (HF=4.57.6 + TRL<1) (push) Waiting to run
Core / Core (HF=latest + TRL=latest) (push) Waiting to run
Core / llama.cpp build + smoke (push) Waiting to run
Kaggle T4 Studio GPU CI / gate (push) Waiting to run
Kaggle T4 Studio GPU CI / Studio GPU smoke (push) Blocked by required conditions
Lint CI / Source lint (Python + shell + YAML + JSON + safety nets) (push) Waiting to run
Local Agent Guides CI / connection (claude) (push) Waiting to run
Local Agent Guides CI / connection (hermes) (push) Waiting to run
Local Agent Guides CI / connection (pi) (push) Waiting to run
Local Agent Guides CI / file-edit (claude) (push) Waiting to run
Local Agent Guides CI / file-edit (hermes) (push) Waiting to run
Local Agent Guides CI / file-edit (opencode) (push) Waiting to run
Unsloth load-orchestrator CI / test (push) Waiting to run
Mac Studio Install Matrix CI / Install + load (macos-15) (push) Waiting to run
Mac Studio Install Matrix CI / Install + load (macos-26) (push) Waiting to run
Mac Studio Install Matrix CI / Install + load (macos-15-intel) (push) Waiting to run
Mac Studio Install Matrix CI / Install + load (macos-26-intel) (push) Waiting to run
Mac Studio UI + API + Update CI / Chat UI, API and Update Tests (push) Waiting to run
Unsloth Tauri CI / Tauri Linux debug build (no codesign) (push) Waiting to run
Unsloth Tauri CI / Rust unit tests (windows) (push) Waiting to run
Unsloth Tauri CI / Rust unit tests (macos) (push) Waiting to run
Unsloth UI CI / Chat UI Tests (push) Waiting to run
Windows Unsloth GGUF CI / GGUF inference smoke (API, tools, vision) (push) Waiting to run
Windows Unsloth GGUF CI / setup.ps1 unit tests (VS 2026 / CMake guard) (push) Waiting to run
Windows Unsloth GGUF CI / real-VS detection (VS 2022) (push) Waiting to run
Windows Unsloth GGUF CI / VC++ runtime detect + install round-trip (windows-latest) (push) Waiting to run
Windows Unsloth Update CI / Unsloth Updating Tests (push) Waiting to run
Wheel CI / Wheel build + content sanity + import smoke (push) Waiting to run
Windows Application Control CI / installer survives a denied unsloth.exe (push) Waiting to run
Unsloth GGUF CI / OpenAI, Anthropic API tests (push) Waiting to run
Unsloth GGUF CI / Tool calling Tests (push) Waiting to run
Unsloth GGUF CI / JSON, images (push) Waiting to run
Mac Studio GGUF CI / GGUF inference smoke (API, tools, vision) (push) Waiting to run
Unsloth Update CI / Unsloth Updating Tests (push) Waiting to run
Windows Unsloth API CI / Unsloth API & Auth Tests (push) Waiting to run
Windows Unsloth GGUF CI / Unsloth install + inference without Visual Studio (push) Waiting to run
Windows Unsloth GGUF CI / GPU prebuilt resolves without Visual Studio (push) Waiting to run
Windows Unsloth GGUF CI / real-VS detection (VS 2026) (push) Waiting to run
Windows Unsloth GGUF CI / VC++ runtime detect + install round-trip (windows-2025-vs2026) (push) Waiting to run
Windows Unsloth UI CI / Chat UI Tests (push) Waiting to run
Workflow trigger lint / workflow-trigger lint (pull_request_target / cache-poisoning) (push) Waiting to run
Repair the Tauri retry test against the download-marker pipeline (#8996)
* Repair the Tauri retry test against the download-marker pipeline

Shell installer tests has been failing on main, and failing in the worst way:
the file printed its header and exited 1 with no FAIL line, because two
separate things broke and both of them are silent.

#8805 added the uv download markers, which put the wrapped command inside
`{ ...; } | _uv_download_markers ...`. The verbose path was already a pipe;
the quiet path, which is the one this file exercises, was not. Two
consequences:

1. This file hand-copies five functions out of install.sh and stubs five
   more. It never learned about _uv_download_markers, so the last stage of
   that pipeline was "command not found", every wrapped command looked like
   it exited 127, and `set -e` ended the run. Extract the real function
   rather than stub it, so the test still exercises the pipe the installer
   actually runs.

2. The command now runs in a subshell, so _test_command's `_test_attempt`
   increments were discarded. It failed on every attempt instead of
   succeeding on the second, which is precisely the retry-recovers path the
   first assertion is about. Move the counter into a file.

Both are needed; each alone still fails, at a different assertion.

#8805 is right on both counts. Streaming output through a marker filter
requires a pipe, and real installs run external commands, so a subshell costs
them nothing. It was the test's harness that had gone stale.

Also add `|| true` to the two `grep -c` calls that gate the first
assertion. grep -c exits 1 on a zero count, which under `set -e` aborts with
no output. That is why this read as silence rather than as a failure, and the
same guard is already applied to the grep -c calls later in the file.

tests/sh: 47 files, all passing.

* Keep the attempt file in the final EXIT cleanup

The second trap replaces the first, so naming the attempt file only in the
first one leaked it: one stray temp file per run, measured.

* Name the remaining silent aborts in the Tauri retry test

My earlier commit message claimed the grep -c guard was already applied to the
rest of the file. That was wrong: lines 231, 326 and 368 were still unguarded,
so a zero count there aborts under set -e before the FAIL line it gates.

Worse, the guard I did add only covers the case where a wrapped command
succeeds and emits the wrong markers. The dominant path is the command itself
returning non-zero: under set -e that aborts at the call, before any assertion
runs. A broken installer retry therefore still reproduced the exact
header-then-silence symptom this file was fixed for.

Guard the three grep -c sites, and give the four commands that must succeed an
explicit failure message instead of letting set -e end the run mutely.

Each path mutation checked, silence to a named failure:

  retry never recovers       -> FAIL: recovered retry returned non-zero
  rollback_substep renamed   -> FAIL: successful Unix rollback output ...
  UNSLOTH_TAURI_MODE renamed -> FAIL: Unix installer does not pass Tauri mode

tests/sh: 47 files, all passing, no temp files leaked.
2026-08-16 07:40:19 -07:00
..
test_agent_guides_timeout_classification.sh Keep the file-edit turn 2 prompt to one instruction, and stop waiving its cap (#7846) 2026-08-04 23:47:42 -07:00
test_apt_distro_prompt.sh install.sh, setup.sh: apply the no-tty consent fix to the remaining sites (#7470) 2026-07-26 05:22:28 -07:00
test_clean_machine_install_name_tool_assert.sh Installer: suppress macOS uv developer tools dialog (#8479) 2026-08-11 12:19:30 -07:00
test_get_torch_index_url.sh Linux: resolve the ROCm version from every source, not the first that answers (#8414) 2026-08-11 05:55:17 -07:00
test_install_host_defaults.sh Anchor the host-defaults assertions and take the file off the skip list (#7774) 2026-08-03 02:42:26 -07:00
test_install_pipe_safety.sh Installer: wrap install.sh in a function so a piped install cannot report curl (56) (#7548) 2026-07-28 21:16:31 -07:00
test_install_python_guard.sh Installer: suppress macOS uv developer tools dialog (#8479) 2026-08-11 12:19:30 -07:00
test_install_rollback_lifecycle.sh Surface actionable installer failures in Studio desktop (#7529) 2026-07-28 10:19:44 +02:00
test_install_sh_xpu_flavor_probe.sh Add Intel Arc GPU detection and XPU PyTorch install to Windows installer (#7706) 2026-08-04 03:03:10 -07:00
test_install_uv_override_space.sh Resolve latest mlx-vlm and route its new processors (#8251) 2026-08-09 15:39:34 +03:00
test_linux_deps_gate.sh Installer: stop requiring a developer toolchain on the consumer path (#7547) 2026-07-28 18:50:38 -07:00
test_llama_build_jobs.sh Studio: cap llama.cpp source build parallelism by RAM (#8061) 2026-08-07 04:12:10 -07:00
test_llama_degraded_tauri_mode.sh Studio setup: report a missing llama.cpp in Tauri mode instead of aborting the install (#7720) 2026-08-01 04:12:25 -07:00
test_mac_intel_compat.sh Installer: suppress macOS uv developer tools dialog (#8479) 2026-08-11 12:19:30 -07:00
test_macos_clt_gate.sh Installer: suppress macOS uv developer tools dialog (#8479) 2026-08-11 12:19:30 -07:00
test_macos_uv_install_name_tool_guard.sh Installer: suppress macOS uv developer tools dialog (#8479) 2026-08-11 12:19:30 -07:00
test_macos_venv_python_preference.sh Installer: suppress macOS uv developer tools dialog (#8479) 2026-08-11 12:19:30 -07:00
test_node_decision.sh Studio: use an isolated Node.js for the frontend build instead of replacing the system Node/npm (#6533) 2026-06-21 21:17:29 -07:00
test_nvcc_meets_llama_minimum.sh Windows installer: fix DiskPart UAC mid-install, drive-root cache, and spurious unsloth.exe rename warning (#6296) 2026-06-22 03:09:08 -07:00
test_packaged_frontend_skip.sh Studio: skip redundant packaged frontend rebuilds (#8326) 2026-08-11 03:02:17 -07:00
test_previous_torch_pin.sh Add Intel Arc GPU detection and XPU PyTorch install to Windows installer (#7706) 2026-08-04 03:03:10 -07:00
test_redact_install_output.sh install: let UNSLOTH_TORCH_INDEX_FAMILY / _URL override CUDA wheel detection (#6692) 2026-07-20 00:58:52 -07:00
test_resolve_cuda_archs.sh studio/setup.sh: guard empty CUDA arch detection in the source build (#5854) (#6481) 2026-06-23 01:26:43 -07:00
test_rocm_version_source_disagreement.sh Linux: resolve the ROCm version from every source, not the first that answers (#8414) 2026-08-11 05:55:17 -07:00
test_setup_http_get.sh Installer: accept wget in studio/setup.sh, as install.sh already does (#7600) 2026-07-29 03:05:42 -07:00
test_setup_sh_denied_install_tree.sh Report a denied UNSLOTH_LOCAL_LLAMA_CPP_DIR instead of aborting on errexit (#8143) 2026-08-08 01:18:24 -07:00
test_setup_webview_cache_clear.sh Setup: clear stale WebView caches on install and update, keep user settings and data (#7361) 2026-08-07 06:35:01 -07:00
test_setup_xpu_fastpath_escape.sh Add Intel Arc GPU detection and XPU PyTorch install to Windows installer (#7706) 2026-08-04 03:03:10 -07:00
test_setup_xpu_posix_summary.sh Add Intel Arc GPU detection and XPU PyTorch install to Windows installer (#7706) 2026-08-04 03:03:10 -07:00
test_staged_validation_enabled.sh fix(studio): opt-in source-build GPU smoke validation (#7322) 2026-07-23 19:13:54 -07:00
test_strixhalo_wsl_reroute.sh Studio: add UNSLOTH_SKIP_AUTOSTART installer flag (#7093) 2026-07-12 21:23:14 -07:00
test_studio_home_node_dir.sh Studio: use an isolated Node.js for the frontend build instead of replacing the system Node/npm (#6533) 2026-06-21 21:17:29 -07:00
test_system_node_readonly.sh Studio: use an isolated Node.js for the frontend build instead of replacing the system Node/npm (#6533) 2026-06-21 21:17:29 -07:00
test_tauri_install_exit_order.sh Windows installer: fix DiskPart UAC mid-install, drive-root cache, and spurious unsloth.exe rename warning (#6296) 2026-06-22 03:09:08 -07:00
test_tauri_retry_failure_context.sh Repair the Tauri retry test against the download-marker pipeline (#8996) 2026-08-16 07:40:19 -07:00
test_torch_constraint.sh tests: stop the installer constraint test counting occurrences (#7503) 2026-07-27 06:42:20 -07:00
test_torch_flavor.sh Add Intel Arc GPU detection and XPU PyTorch install to Windows installer (#7706) 2026-08-04 03:03:10 -07:00
test_uninstall_arg_guard.sh Close two false passes in the uninstaller argument tests, and document the piped help form (#7690) 2026-08-01 03:02:44 -07:00
test_uninstall_prebuilt_artifacts.sh Uninstall the whisper.cpp prebuilt and the node/whisper install locks (#7686) 2026-08-01 03:03:30 -07:00
test_uninstall_sd_cpp_custom_root.sh Studio: install sd.cpp under the Studio home, not beside it (#8226) 2026-08-10 07:03:20 -07:00
test_uninstall_shared_icon.sh Make the uninstaller test suites run on macOS and Windows PowerShell 5.1 (#7643) 2026-07-30 04:09:02 -07:00
test_uninstall_webview_data.sh Fix two macOS installer bugs (#8279) 2026-08-09 22:40:14 -07:00
test_unsloth_torch_override.sh Installer: restore interrupted updates and clean stale rollback environments (#7342) 2026-07-23 01:29:53 -07:00
test_uv_pinned_release.sh Reduce antivirus false positives in the desktop installers (#8586) 2026-08-13 07:02:18 -07:00
test_with_llama_cpp_dir_flag.sh Windows: do not abort setup on an unreadable llama.cpp install (#7735) 2026-08-02 07:25:39 -07:00
test_with_llama_cpp_dir_link_behavior.sh Surface actionable installer failures in Studio desktop (#7529) 2026-07-28 10:19:44 +02:00
test_xpu_bitsandbytes_reachable.sh Add Intel Arc GPU detection and XPU PyTorch install to Windows installer (#7706) 2026-08-04 03:03:10 -07:00
test_xpu_torch_spec_parity.sh Add Intel Arc GPU detection and XPU PyTorch install to Windows installer (#7706) 2026-08-04 03:03:10 -07:00