[BUG] Can't run tests locally on nix-shell: xargs: unrecognized option '--verbose'
glyh opened this issue · comments
[nix-shell:~/Documents/CS/oils/oil]$ test/spec-py.sh ysh-all
__ hay
__ ysh-augmented
__ hay-meta
__ ysh-assign
__ ysh-bin
__ hay-isolation
__ ysh-bugs
__ ysh-builtin-ctx
__ ysh-builtin-eval
__ ysh-builtin-error
__ ysh-blocks
ysh-bin: FATAL: 2 tests failed (2 oils failures)
__ ysh-builtin-help
ysh-builtin-eval: FATAL: Got 5 failures (5 oils failures), but 1 are allowed
hay-isolation: FATAL: 6 tests failed (6 oils failures)
hay-meta: FATAL: 6 tests failed (6 oils failures)
__ ysh-builtin-meta
__ ysh-builtin-module
ysh-bugs: FATAL: 7 tests failed (7 oils failures)
__ ysh-builtin-process
__ ysh-builtin-shopt
ysh-builtin-ctx: FATAL: 8 tests failed (8 oils failures)
__ ysh-builtins
ysh-augmented: FATAL: 10 tests failed (10 oils failures)
ysh-builtin-help: FATAL: Got 3 failures (3 oils failures), but 1 are allowed
__ ysh-case
__ ysh-command-sub
ysh-builtin-error: FATAL: 14 tests failed (14 oils failures)
__ ysh-completion
ysh-builtin-process: FATAL: 3 tests failed (3 oils failures)
__ ysh-convert
ysh-builtin-module: FATAL: 5 tests failed (5 oils failures)
ysh-blocks: FATAL: 16 tests failed (16 oils failures)
__ ysh-demo
__ ysh-dev
ysh-builtin-meta: FATAL: Got 7 failures (7 oils failures), but 1 are allowed
__ ysh-dict
ysh-assign: FATAL: Got 21 failures (21 oils failures), but 2 are allowed
__ ysh-expr-arith
ysh-builtin-shopt: FATAL: Got 9 failures (9 oils failures), but 1 are allowed
__ ysh-expr-bool
ysh-command-sub: FATAL: Got 7 failures (7 oils failures), but 1 are allowed
hay: FATAL: Got 23 failures (23 oils failures), but 2 are allowed
ysh-demo: FATAL: 3 tests failed (3 oils failures)
__ ysh-expr-compare
__ ysh-expr-sub
__ ysh-expr
ysh-dev: FATAL: 4 tests failed (4 oils failures)
__ ysh-for
ysh-dict: FATAL: 5 tests failed (5 oils failures)
__ ysh-func-builtin
ysh-completion: FATAL: Got 12 failures (12 oils failures), but 6 are allowed
ysh-convert: FATAL: 12 tests failed (12 oils failures)
__ ysh-func
ysh-expr-sub: FATAL: 4 tests failed (4 oils failures)
__ ysh-funcs-external
ysh-expr-bool: FATAL: 6 tests failed (6 oils failures)
__ ysh-int-float
ysh-case: FATAL: 18 tests failed (18 oils failures)
__ ysh-interactive
ysh-func-builtin: FATAL: 1 tests failed (1 oils failures)
__ ysh-json
__ ysh-keywords
ysh-funcs-external: note: Got 3 allowed oils failures (exit with code 0)
ysh-interactive: FATAL: 2 tests failed (2 oils failures)
__ ysh-list
__ ysh-methods
ysh-keywords: FATAL: 2 tests failed (2 oils failures)
ysh-expr-arith: FATAL: Got 17 failures (17 oils failures), but 1 are allowed
ysh-expr-compare: FATAL: Got 15 failures (15 oils failures), but 1 are allowed
__ ysh-multiline
__ ysh-options-assign
__ ysh-options
ysh-for: FATAL: Got 14 failures (14 oils failures), but 1 are allowed
ysh-builtins: FATAL: Got 31 failures (31 oils failures), but 5 are allowed
ysh-int-float: FATAL: 8 tests failed (8 oils failures)
__ ysh-proc
__ ysh-place
__ ysh-prompt
ysh-options-assign: FATAL: 5 tests failed (5 oils failures)
ysh-list: FATAL: 7 tests failed (7 oils failures)
__ ysh-regex-api
__ ysh-regex
ysh-place: FATAL: Got 4 failures (4 oils failures), but 1 are allowed
__ ysh-reserved
ysh-multiline: FATAL: 10 tests failed (10 oils failures)
ysh-prompt: FATAL: 7 tests failed (7 oils failures)
__ ysh-scope
__ ysh-slice-range
ysh-reserved: FATAL: 4 tests failed (4 oils failures)
__ ysh-source
ysh-func: FATAL: 30 tests failed (30 oils failures)
ysh-proc: FATAL: 17 tests failed (17 oils failures)
__ ysh-special-vars
__ ysh-stdlib-2
ysh-source: FATAL: 3 tests failed (3 oils failures)
__ ysh-stdlib-args
ysh-expr: FATAL: 45 tests failed (45 oils failures)
ysh-slice-range: FATAL: Got 11 failures (11 oils failures), but 1 are allowed
__ ysh-stdlib-synch
ysh-methods: FATAL: Got 29 failures (29 oils failures), but 2 are allowed
__ ysh-stdlib-testing
__ ysh-stdlib
ysh-special-vars: FATAL: 5 tests failed (5 oils failures)
__ ysh-string
ysh-stdlib-testing: note: Got 1 allowed oils failures (exit with code 0)
ysh-stdlib-2: FATAL: 9 tests failed (9 oils failures)
ysh-stdlib-synch: FATAL: 3 tests failed (3 oils failures)
__ ysh-tuple
__ ysh-unicode
__ ysh-usage
ysh-scope: FATAL: Got 22 failures (22 oils failures), but 2 are allowed
__ ysh-user-feedback
ysh-stdlib-args: FATAL: Got 9 failures (9 oils failures), but 1 are allowed
ysh-stdlib: FATAL: 7 tests failed (7 oils failures)
ysh-unicode: FATAL: 1 tests failed (1 oils failures)
__ ysh-var-sub
__ ysh-with-sh
ysh-tuple: FATAL: Got 3 failures (3 oils failures), but 1 are allowed
ysh-options: FATAL: 41 tests failed (41 oils failures)
__ ysh-word-eval
__ ysh-xtrace
ysh-regex: FATAL: Got 34 failures (34 oils failures), but 1 are allowed
ysh-regex-api: FATAL: 33 tests failed (33 oils failures)
ysh-usage: FATAL: Got 3 failures (3 oils failures), but 1 are allowed
ysh-json: FATAL: Got 54 failures (54 oils failures), but 2 are allowed
ysh-var-sub: note: Got 4 allowed oils failures (exit with code 0)
ysh-user-feedback: FATAL: 8 tests failed (8 oils failures)
ysh-string: FATAL: 20 tests failed (20 oils failures)
ysh-with-sh: FATAL: 11 tests failed (11 oils failures)
ysh-word-eval: FATAL: Got 11 failures (11 oils failures), but 1 are allowed
ysh-xtrace: FATAL: 19 tests failed (19 oils failures)
xargs: unrecognized option '--verbose'
BusyBox v1.30.1 () multi-call binary.
Usage: xargs [OPTIONS] [PROG ARGS]
Run PROG on every item given by stdin
-p Ask user whether to run each command
-r Don't run command if input is empty
-0 Input is separated by NULs
-a FILE Read from FILE instead of stdin
-t Print the command on stderr before execution
-e[STR] STR stops input processing
-n N Pass no more than N args to PROG
-s N Pass command line of no more than N bytes
-I STR Replace STR within PROG ARGS with input line
-P N Run up to N PROGs in parallel
-x Exit if size is exceeded
real 0m2.684s
user 0m15.743s
sys 0m6.919s
Oh why does nix shell use busybox xargs?
It should use GNU xargs
On Arch Linux python2 is not maintained so this is crucial.
This is fixed by NixOS/nixpkgs#10716, but I'm running into more errors due to python 2 being EOL. Let me see if I can fix this. I'll file a PR once done.
I have
*** 63 tests FAILED
Traceback (most recent call last):
File "/home/lyh/Documents/CS/oils/oil/bin/oils_for_unix.py
", line 20, in <module>
import posix_ as posix
ImportError: /nix/store/wx1vk75bpdr65g6xwxbj4rw0pk04v5j3-gli
bc-2.27/lib/libdl.so.2: undefined symbol: _dl_catch_error, v
ersion GLIBC_PRIVATE
Okay with some investigation I have realize that there's probably something wrong with /pyext/posixmodule.c
or something. But it's weird that when running bin/ysh
it works as intended.
That's another reason for not using the current approach. Due to python 2 being EOL everything just broke. No way to test anything locally on Arch Linux and nix-shell also need a lot of hack.
Oh I just saw the big thread on Zulip
https://oilshell.zulipchat.com/#narrow/stream/417617-help-wanted/topic/Fix.20nix-shell
My advice - don't use Nix the first time
You're just making life harder -- I don't use Nix and it's not maintained
The only supported way is to use the "wedges" now
I run test/spec-py.sh ysh-all
locally as well
Python 2 is EOL, and it won't work on Arch Linux. Last update to that package is ~2 years ago. Docs on python2 on the internet is ~10 years ago.
Also I think it's irrational to think of rebuild everything on the world.
So basically for now there's no way to test oils on Arch Linux. And the nix environment also doesn't work.
nix-shell is not support offcially and there's no way to fix.