go-modules/packages: Run unit tests under subdirs#173702
go-modules/packages: Run unit tests under subdirs#173702Mic92 merged 8 commits intoNixOS:stagingfrom
Conversation
0f07c85 to
d676e7c
Compare
|
Continuation of #171177. Fixes the test breakages unearthed by the subdirectory fix. @NixOS/nixos-release-managers: Should build fixes be split into to per-package commits or should they stay as part of this a single commit? |
|
Great work. |
|
Since |
|
I belive most of these checkFlags are added by me. Sorry about that. The following packages also need to fix:
I would like to help to fix it. |
Well, this change fixes |
You may opt for dropping |
|
The question about whether multiple commits are required is something I cannot really answer because it's not related to the release process. |
|
@ofborg build kompose |
Bug: Due to the way `buildGoDir` function was repurposed to also run `go test`, if `checkFlags` was defined, `go test` was ran only at the top level directory. Only the first element of `checkFlags` array would get passed to the `go test` command as arguments. Fix: Now the first parameter to `buildGoDir` is handled as the command. If the command is "test" `checkFlags` get passed as arguments along with other build flags like ldflags, tags, etc. Readability: - Iteratively build a flag array in `buildGoDir` instead of single long variable expansion command line. - Bash style: Single line local assignment of positional parameters.
The version of Ginkgo it relies on might be the problem. Bug fixed by NixOS#173702 runs the previously skipped tests for this package.
- Disable the tests requiring access to gitlab.com. - Add coreutils to `nativeBuildInputs` for printf and echo binaries. - Fix hard coded paths to coreutils binaries. Bug fixed by NixOS#173702 runs the previously skipped tests for this package.
Bug fixed by NixOS#173702 runs the previously skipped tests for this package.
Bug fixed by NixOS#173702 runs the previously skipped tests for this package.
These test are written in a way that they don't skip themselves if they cannot find an Android device attached over USB to the running host. Bug fixed by NixOS#173702 runs the previously skipped tests for this package.
Disable the tests requiring access to gitlab.com Bug fixed by NixOS#173702 runs the previously skipped tests for this package.
Bug fixed by NixOS#173702 runs the previously skipped tests for this package.
|
Note to committer: Do not squash. |
|
@zowoq may I get your review? In the previous iteration of this, you provided valuable comments. I think this PR addresses unearthing of packages with broken test that was previously skipped (unintentionally). We're out of ZHF, so maybe we can try this in staging? |
|
Looks like an eval error? @ofborg eval |
I'm confused. This PR neither touches the failing package nor anything that'd affect the evaluation of My caveman test doesn't catch an eval failure: |
|
@Mic92 thanks to @vcunat I think the problem nixpkgs-review hits this eval issue is because it's disabling BTW, I also filed #179226 to remove use of |
|
@ofborg eval |
|
Mhm, weird. They failed to build, but maybe it was some concurrency issue. |
Bug Fix:
Due to the way
buildGoDirfunction was repurposed to also rungo test, ifcheckFlagswas defined,go testwas ran only at the toplevel directory.
Only the first element of
checkFlagsarray would get passed to thego testcommand as arguments.Now the first parameter to
buildGoDiris handled as the command.If the command is "test"
checkFlagsget passed as arguments alongwith other build flags like ldflags, tags, etc.
Readability:
buildGoDirinstead of single longvariable expansion command line.
Fix broken packages with newly enabled tests:
non-localhost networking.
cgo.
USB.
requiring non-localhost networking
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes