-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
We currently write our functional tests in Bash. Bash works fine on Unix, but it does not work in a native manner on Windows. (MSYS or Cygwin Bash emulates so much Unix behavior, it would not be a good test of our Windows port.)
For Windows-only functional tests, its easy to imagine using batch scripts (cmd.exe) or Powershell scripts, but those are also trickier to run on Unix. (Actually Powershell does work on Unix, but the whole .NET runtime to just run a simple script is quite a heavy dependency.)
The big question is thus, what is a good simple way to write scripts that works on both Unix and Windows without much overhead? (In https://discourse.nixos.org/t/nix-on-windows/1113 (and possibly a Nixpkgs issue I cannot find at this time), there was a similar discussion about what is a good stdenv shell for both platforms. That is a much heavier decision that the Nix functional tests however. We can use this decision as a "warm up" for that.) Some options that came up so far are:
- Perl (What Volth used in his Nixpkgs port, see https://lastlog.de/blog/libnix_volth's_work.html#volths-windows-bash-discussion)
- Python
- Ruby
- Lua
I lean towards Lua as the least janky of those, but it is unclear whether it will be sufficiently batteries-included out of the box (e.g., piping commands).
We've talked more generally about trying to make the functional tests better and less "overfit" (e.g. being able to run the same test in multiple store implements). This effort should definitely tie in with that.