Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: nix build .#trycmd fails under Darwin due to a different username for nix build process #1144

Open
booxter opened this issue Sep 22, 2024 · 1 comment
Labels
errors Something isn't working

Comments

@booxter
Copy link
Contributor

booxter commented Sep 22, 2024

This is how it looks like. Note that nixbld -> _nixbld1 on Darwin systems.

     Running tests/cli_tests.rs (target/debug/deps/cli_tests-ec24a989df75ba1e)

running 3 tests
Testing tests/gen/inexistant_file_unix.toml ... ok
Testing tests/cmd/icons_all.toml ... ok
Testing tests/cmd/basic_all.toml ... ok
Testing tests/cmd/absolute_unix.toml ... ok
test cli_all_tests ... ok
Testing tests/cmd/absolute_recurse_unix.toml ... ok
test cli_unix_tests ... ok
Testing tests/gen/long_extended_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_icons_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_git_repos_no_status_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_grid_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_header_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - Permissions Size User   Date Modified Name
   2      - drwxr-xr-x     - nixbld  1 Jan  1970  git
   3      - drwxr-xr-x     - nixbld  1 Jan  1970  grid
   4      - drwxr-xr-x     - nixbld  1 Jan  1970  group
   5      - drwxr-xr-x     - nixbld  1 Jan  1970  icons
   6      - drwxr-xr-x     - nixbld  1 Jan  1970  perms
   7      - drwxr-xr-x     - nixbld  1 Jan  1970  size
   8      - drwxr-xr-x     - nixbld  1 Jan  1970  specials
   9      - drwxr-xr-x     - nixbld  1 Jan  1970  symlinks
  10      - drwxr-xr-x     - nixbld  1 Jan  1970  time
        1 + Permissions Size User     Date Modified Name
        2 + drwxr-xr-x     - _nixbld1  1 Jan  1970  git
        3 + drwxr-xr-x     - _nixbld1  1 Jan  1970  grid
        4 + drwxr-xr-x     - _nixbld1  1 Jan  1970  group
        5 + drwxr-xr-x     - _nixbld1  1 Jan  1970  icons
        6 + drwxr-xr-x     - _nixbld1  1 Jan  1970  perms
        7 + drwxr-xr-x     - _nixbld1  1 Jan  1970  size
        8 + drwxr-xr-x     - _nixbld1  1 Jan  1970  specials
        9 + drwxr-xr-x     - _nixbld1  1 Jan  1970  symlinks
       10 + drwxr-xr-x     - _nixbld1  1 Jan  1970  time
stderr:

Testing tests/gen/long_octal_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - 0755 drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + 0755 drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_header_unix.toml ... ok
Testing tests/gen/long_all_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_time_style_custom_non_recent_only_nix.toml ... ok
Testing tests/gen/long_file_size_unix.toml ... ok
Testing tests/gen/only_dir_unix.toml ... ok
Testing tests/gen/long_git_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_time_style_custom_non_recent_empty_nix.toml ... ok
Testing tests/gen/long_git_repos_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_binary_bytes_unix.toml ... ok
Testing tests/gen/long_time_style_custom_recent_empty_nix.toml ... ok
Testing tests/gen/long_time_style_custom_non_recent_none_nix.toml ... ok
Testing tests/gen/only_file_unix.toml ... ok
Testing tests/gen/long_time_style_custom_non_recent_and_recent_nix.toml ... ok
Testing tests/gen/long_time_style_relative_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - nixbld 54 years git
   2      - drwxr-xr-x - nixbld 54 years grid
   3      - drwxr-xr-x - nixbld 54 years group
   4      - drwxr-xr-x - nixbld 54 years icons
   5      - drwxr-xr-x - nixbld 54 years perms
   6      - drwxr-xr-x - nixbld 54 years size
   7      - drwxr-xr-x - nixbld 54 years specials
   8      - drwxr-xr-x - nixbld 54 years symlinks
   9      - drwxr-xr-x - nixbld 54 years time
        1 + drwxr-xr-x - _nixbld1 54 years git
        2 + drwxr-xr-x - _nixbld1 54 years grid
        3 + drwxr-xr-x - _nixbld1 54 years group
        4 + drwxr-xr-x - _nixbld1 54 years icons
        5 + drwxr-xr-x - _nixbld1 54 years perms
        6 + drwxr-xr-x - _nixbld1 54 years size
        7 + drwxr-xr-x - _nixbld1 54 years specials
        8 + drwxr-xr-x - _nixbld1 54 years symlinks
        9 + drwxr-xr-x - _nixbld1 54 years time
stderr:

Testing tests/gen/long_unix.toml ... ok
Testing tests/gen/long_blocksize_nix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      - drwxr-xr-x - - nixbld  1 Jan  1970 git
   2      - drwxr-xr-x - - nixbld  1 Jan  1970 grid
   3      - drwxr-xr-x - - nixbld  1 Jan  1970 group
   4      - drwxr-xr-x - - nixbld  1 Jan  1970 icons
   5      - drwxr-xr-x - - nixbld  1 Jan  1970 perms
   6      - drwxr-xr-x - - nixbld  1 Jan  1970 size
   7      - drwxr-xr-x - - nixbld  1 Jan  1970 specials
   8      - drwxr-xr-x - - nixbld  1 Jan  1970 symlinks
   9      - drwxr-xr-x - - nixbld  1 Jan  1970 time
        1 + drwxr-xr-x - - _nixbld1  1 Jan  1970 git
        2 + drwxr-xr-x - - _nixbld1  1 Jan  1970 grid
        3 + drwxr-xr-x - - _nixbld1  1 Jan  1970 group
        4 + drwxr-xr-x - - _nixbld1  1 Jan  1970 icons
        5 + drwxr-xr-x - - _nixbld1  1 Jan  1970 perms
        6 + drwxr-xr-x - - _nixbld1  1 Jan  1970 size
        7 + drwxr-xr-x - - _nixbld1  1 Jan  1970 specials
        8 + drwxr-xr-x - - _nixbld1  1 Jan  1970 symlinks
        9 + drwxr-xr-x - - _nixbld1  1 Jan  1970 time
stderr:

Testing tests/gen/long_recurse_with_level_unix.toml ... ok
Testing tests/gen/only_dir_recursive_unix.toml ... ok
Testing tests/gen/recursive_unix.toml ... ok
Testing tests/gen/tree_long_unix.toml ... ok
Testing tests/gen/tree_unix.toml ... ok
Testing tests/gen/only_dir_recursive_long_unix.toml ... ok
Testing tests/gen/recursive_long_unix.toml ... ok
Testing tests/gen/long_links_recurse_unix.toml ... failed
Exit: success

---- expected: stdout
++++ actual:   stdout
   1      -   12 git
   2      - 1002 grid
   3      -    2 group
   4      -    2 icons
   5      -    2 perms
   6      -    2 size
   7      -    2 specials
   8      -    3 symlinks
   9      -    2 time
        1 +    12 git
        2 + 2,002 grid
        3 +     3 group
        4 +    18 icons
        5 +     4 perms
        6 +     6 size
        7 +     2 specials
        8 +     9 symlinks
        9 +     8 time
  10   10 | 
  11   11 | tests/test_dir/git:
  12      - 3 001
  13      - 3 002
  14      - 3 003
  15      - 3 004
  16      - 3 005
  17      - 3 006
  18      - 3 007
  19      - 3 008
  20      - 3 009
  21      - 3 010
       12 + 13 001
       13 + 13 002
       14 + 13 003
       15 + 13 004
       16 + 13 005
       17 + 13 006
       18 + 13 007
       19 + 13 008
       20 + 13 009
       21 + 13 010
  22   22 | 
  23   23 | tests/test_dir/git/001:
  24   24 | 1 file_000
  25   25 | 1 file_001
  26   26 | 1 file_002
          ⋮
4191 4191 | 1 1h
4192 4192 | 1 1m
4193 4193 | 1 1s
4194 4194 | 1 1y
4195 4195 | 1 epoch
stderr:

Update snapshots with `TRYCMD=overwrite`
Debug output with `TRYCMD=dump`
test cli_nix_generated_tests ... FAILED

failures:

---- cli_nix_generated_tests stdout ----
thread 'cli_nix_generated_tests' panicked at '13 of 32 tests failed', /sources/trycmd-0.15.2-29622709ff54daef580ca6fff0687368527662c9e36fa8907438af
35eb334b19/src/runner.rs:104:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    cli_nix_generated_tests

test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.71s

error: test failed, to rerun pass `--test cli_tests`
/nix/store/8sqsglvyvy56ckbazl8k6pxk8x4wwvj2-stdenv-darwin/setup: line 1569: pop_var_context: head of shell_variables not a function context
@booxter booxter added the errors Something isn't working label Sep 22, 2024
@cafkafk
Copy link
Member

cafkafk commented Sep 23, 2024

Admittedly, that whole system was a bit of a hack we just scrambled to create back when we initially forged and had to move of the proprietary vagrant we inherited. Ideally, we'd run these tests as NixOS VM tests, then we can control what user the tests are being run as, and many other properties that would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants