xonsh / xonsh

:shell: Python-powered shell. Full-featured and cross-platform.
http://xon.sh
Other
8.17k stars 632 forks source link

Test failure building for NixOS #5569

Open greg-hellings opened 5 days ago

greg-hellings commented 5 days ago

Current Behavior

Trying to build the released 0.17.0 version for nixpkgs, I have gotten tests running with the exception of test_spec_modifier_alias_output_format. It appears to be searching for the echo command, which seems like it's typically a built-in function. For some reason, during this particular test, it is searching instead for echo to be a system executable.

```xsh =================================== FAILURES =================================== ____________________ test_spec_modifier_alias_output_format ____________________ xession = @skip_if_on_windows def test_spec_modifier_alias_output_format(xession): class SpecModifierOutputLinesAlias(SpecModifierAlias): def on_modifer_added(self, spec): spec.output_format = "list_lines" xession.aliases["xlines"] = SpecModifierOutputLinesAlias() cmds = [["xlines", "echo", "1\n2\n3"]] specs = cmds_to_specs(cmds, captured="stdout") (p := _run_command_pipeline(specs, cmds)).end() > assert p.output == ["1", "2", "3"] E AssertionError: assert [] == ['1', '2', '3'] E E Right contains 3 more items, first extra item: '1' E Use -v to get more diff tests/procs/test_specs.py:331: AssertionError ----------------------------- Captured stderr call ----------------------------- xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True xonsh: subprocess mode: command not found: 'echo' ```

Expected Behavior

Tests build and succeed in nixpkgs/NixOS builds if the appropriate set of dependency packages is present.

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

anki-code commented 5 days ago

hey! Maybe it's related to #5003. The good start point is to provide repeatable list of commands in docker like this - https://github.com/xonsh/xonsh/issues/5003#issuecomment-2127665481