Skip to content
Snippets Groups Projects
Commit 336b4433 authored by STEVAN Antoine's avatar STEVAN Antoine :crab: Committed by DETCHART Jonathan
Browse files

fix Nushell tests (!24)

because this was developed when Nushell was in 0.95.0, some tweaks had to be added

- allow to set the Nushell binary with the `NU` var in `Makefile`, e.g. `make NU="nu-0.95.0" test` if you have Nushell 0.95.0 installed as `nu-0.95.0` in `PATH`
- use `$nu.current-exe` for nested Nushell invocation to preserve the version set in the top-level `Makefile`
- use `--no-config-file` to make sure there is no interaction with the user's config, which might not be for the correct version
parent 151bd125
No related branches found
No related tags found
1 merge request!24fix Nushell tests
NU="nu"
.PHONY: fmt fmt-check check clippy test show show-proxy unset-proxy toto
ssh_addr_file = 0
......@@ -19,9 +20,9 @@ clippy:
test:
cargo build --release
ifeq ($(ssh_addr_file),0)
nu help_func/execute_all_tests.nu
${NU} --no-config-file help_func/execute_all_tests.nu
else
nu help_func/execute_all_tests.nu --ssh-addr-file $(ssh_addr_file)
${NU} --no-config-file help_func/execute_all_tests.nu --ssh-addr-file $(ssh_addr_file)
endif
show:
......@@ -30,7 +31,7 @@ show:
rustc --version
cargo --version
cargo clippy --version
nu --version
${NU} --version
show-proxy:
@echo "HTTP_PROXY = ${HTTP_PROXY}"
......
......@@ -13,9 +13,9 @@ def main [--ssh-addr-file: path] {
print $"\n(ansi yellow_reverse) LAUNCHING TEST ($test_name)(ansi reset)\n"
(if $ssh_addr_file == null {
nu $test_name
^$nu.current-exe --no-config-file $test_name
} else {
nu $test_name --ssh-addr-file=$ssh_addr_file
^$nu.current-exe --no-config-file $test_name --ssh-addr-file=$ssh_addr_file
}) e>| do { |e| # capture the possible error and check if it's empty or not
let maybe_error = ($e | parse -r "(Error: .*)")
if ($maybe_error | is-empty) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment