Various tests call external binaries including echo, cat, and sh. I'd like to extend Just to work on windows without requiring an installation of cygwin or git-bash, so these dependencies should be removed. Also, the Just package for Nix requires an awkward workaround to patch the correct location of these binaries: https://github.com/NixOS/nixpkgs/pull/59306/files
Fortunately, the functionality that Just requires from external commands is minimal:
echo to print the arguments to a command
cat to print out the effective contents of a shebang recipe
sh to call sleep to introduce a delay
sh to return a specific error code from a child process
In order to remove dependencies on these commands, I propose we add just-test binary, and make it available to integration tests by inserting its location into the PATH environment variable. just-test could be extended with subcommands as needed to support the functionality that tests require:
just-test cat FILE copies the contents of FILE to stdout
just-test sleep N sleeps for N seconds
just-test code I terminates with error code I
just-test echo A... echos arguments to standard output
Various tests call external binaries including
echo,cat, andsh. I'd like to extend Just to work on windows without requiring an installation of cygwin or git-bash, so these dependencies should be removed. Also, the Just package for Nix requires an awkward workaround to patch the correct location of these binaries: https://github.com/NixOS/nixpkgs/pull/59306/filesFortunately, the functionality that Just requires from external commands is minimal:
echoto print the arguments to a commandcatto print out the effective contents of a shebang recipeshto callsleepto introduce a delayshto return a specific error code from a child processIn order to remove dependencies on these commands, I propose we add
just-testbinary, and make it available to integration tests by inserting its location into thePATHenvironment variable.just-testcould be extended with subcommands as needed to support the functionality that tests require:just-test cat FILEcopies the contents of FILE to stdoutjust-test sleep Nsleeps for N secondsjust-test code Iterminates with error code Ijust-test echo A...echos arguments to standard output