tests: Port away from nushell

Open
#2,547 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
testing

Research direction

Start by locating the Nushell test scripts and the test infrastructure that builds or runs them; the issue does not name specific files or a particular test. Read the existing tests and identify one with some complexity, such as an on-target build, to use as the initial port. Done means a Rust-based test binary using xshell can run that test, with infrastructure in place to continue migrating the rest.

Written by the indexing model from the issue text.

Description

I championed using nushell, but I regret it now mostly. It's not bad per se (certainly better than shell script IMO) but the core problem is:

  • They keep making subtle behavioral changes that break us periodically (it's not often but we really do want a 1.0 stable language for our tests)
  • It's a relatively obscure language that while does support some static analysis (definitely better than bash!) many failures are still runtime, and LLMs just don't know it as well. Also it's just another language.

A big complexity here is that of course in going to a compiled language. I think basically what we do is generate a separate bootc-tests binary that embeds all the logic.

I think basically we should use Rust with https://docs.rs/xshell/latest/xshell/ for our tests. It'll be more verbose, but that's probably OK.

To implement this I think we can basically just try to port one test (one that has some complexity, like is doing on-target builds etc) and build out the infra (which will necessarily involve some duplication) but then gradually port over all of the others.

Dominant language
Rust
Stars
2.3k
Forks
230
Avg merge
2d 11h
Merged PRs (30d)
42

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bootc-dev/bootc

All issues in bootc-dev/bootc

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.