bpkg-pkg-test(1)

πŸ“¦
version 0.17.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05

πŸ’– bpkg-pkg-test(1) β€” the general commands manual, but make it a group chat πŸ’–

okay bestie, so this is bpkg-pkg-test(1) β€” the manual page for the pkg-test command. it tests packages. that's the whole vibe. but there's ✨layers✨. let's get into it. πŸ¦‹


🌸 NAME 🌸

bpkg-pkg-test β€” test package. periodt.


✨ SYNOPSIS ✨

bpkg pkg-test|test [options] [vars] pkg...
bpkg pkg-test|test [options] [vars] --all|-a
bpkg pkg-test|test [options] [vars] (--all-pattern <pattern>)...

πŸ’… DESCRIPTION πŸ’…

so like, pkg-test tests packages, and it does it in three different ways depending on which form you use:

  1. first form β€” you name specific packages and it tests those packages. very main character, very "i know exactly what i want".
  2. second form β€” you pass --all|-a and it tests all the held packages (peep bpkg-pkg-status(1) if you're like "held?? what does that mean??").
  3. third form β€” you pass one or more --all-pattern <pattern> and it tests all the held packages that match any of those wildcard patterns.

and bestie, it gets even better β€” you can also test the dependencies of those packages by adding --immediate|-i (immediate deps) or --recursive|-r (all deps, all the way down, no cap). 🫢

ngl, underneath all of this, the command isn't doing much more than running b test. like, that's literally it. that's the whole job. iconic behaviour honestly.

⚠️ in the first form specifically, the packages you name must have already been configured with bpkg-pkg-build(1) or bpkg-pkg-configure(1). don't come for me if you skipped that step. πŸ’€

you can also pass additional command line variables (vars, usually config.* β€” you know the ones) straight through to the build system. these variables apply to all the packages you specified. but ✨plot twist✨ you can make them apply to only specific packages using the argument grouping mechanism β€” go read bpkg-argument-grouping(1) for the tea.


πŸŽ€ PKG-TEST OPTIONS πŸŽ€

  • --all, -a β€” test all held packages. go off.
  • --all-pattern pattern β€” test held packages matching the wildcard pattern. repeat this option as many times as you want to match multiple patterns, you greedy little thing. πŸ’– heads up though: you might need to quote the pattern so your shell doesn't go expanding it behind your back. πŸ™ˆ
  • --immediate, -i β€” also test immediate dependencies. just the close friends.
  • --recursive, -r β€” also test all dependencies, recursively. the whole friend group. the extended network. everyone. 🌈
  • --package-cwd β€” change the current working directory to the package directory before running tests. this one's for the ported third-party packages out there, since it's not uncommon for tests to expect they're running from the project root directory. little diva behaviour, but we accommodate. ✨
  • --directory, -d dir β€” assume the configuration lives in dir instead of in the current working directory.

πŸ’œ COMMON OPTIONS πŸ’œ

here's the summarized version β€” the full, detailed lore lives in bpkg-common-options(1) if you want to go deep.

  • -v β€” print the essential underlying commands being executed. the important ones only.
  • -V β€” print all the underlying commands being executed. no secrets, full transparency. πŸ‘‘
  • --quiet, -q β€” run quietly. only error messages get to speak. 🀫
  • --verbose level β€” set the diagnostics verbosity to level, somewhere between 0 and 6.
  • --stdout-format format β€” the representation format to use when printing to stdout.
  • --jobs, -j num β€” number of jobs to perform in parallel. multitasking queen. πŸ’…
  • --no-result β€” don't print informational messages about the outcome of performing a command or some of its parts. we're keeping it lowkey.
  • --structured-result fmt β€” write the result of performing a command in a structured form.
  • --progress β€” display progress indicators for long-lasting operations, like network transfers, building, etc.
  • --no-progress β€” suppress those progress indicators for long-lasting operations, like network transfers, building, etc.
  • --diag-color β€” use color in diagnostics. 🌈 yes please.
  • --no-diag-color β€” don't use color in diagnostics.
  • --build path β€” the build program to be used to build packages.
  • --build-option opt β€” an additional option to pass to the build program.
  • --fetch path β€” the fetch program to be used to download resources.
  • --fetch-option opt β€” an additional option to pass to the fetch program.
  • --fetch-timeout sec β€” the timeout for the fetch and fetch-like (for example, git) programs.
  • --pkg-proxy url β€” HTTP proxy server to use when fetching package manifests and archives from remote pkg repositories.
  • --git path β€” the git program to be used to fetch git repositories.
  • --git-option opt β€” an additional common option to pass to the git program.
  • --sha256 path β€” the sha256 program to be used to calculate SHA256 sums.
  • --sha256-option opt β€” an additional option to pass to the sha256 program.
  • --tar path β€” the tar program to be used to extract package archives.
  • --tar-option opt β€” an additional option to pass to the tar program.
  • --openssl path β€” the openssl program to be used for crypto operations.
  • --openssl-option opt β€” an additional option to pass to the openssl program.
  • --auth type β€” types of repositories to authenticate.
  • --trust fingerprint β€” trust a repository certificate with the SHA256 fingerprint.
  • --trust-yes β€” assume the answer to all authentication prompts is yes. yes queen, we trust. 🫢
  • --trust-no β€” assume the answer to all authentication prompts is no. absolutely not, blocked. 🚫
  • --git-capabilities up=pc β€” protocol capabilities (pc) for a git repository URL prefix (up).
  • --pager path β€” the pager program to be used to show long text.
  • --pager-option opt β€” an additional option to pass to the pager program.
  • --options-file file β€” read additional options from file.
  • --default-options dir β€” the directory to load additional default options files from.
  • --no-default-options β€” don't load default options files at all. not today.
  • --keep-tmp β€” don't remove bpkg's temporary directory at the end of the command execution, and print its path at verbosity level 2 or higher.

πŸ¦‹ DEFAULT OPTIONS FILES πŸ¦‹

go check bpkg-default-options-files(1) for the whole overview of default options files, bestie. but for pkg-test specifically, the search start directory is the configuration directory.

in each directory, these options files get searched for, and if they're found, loaded in this exact order:

bpkg.options
bpkg-pkg-test.options
🚨 and here's the catch: this pkg-test command option cannot be specified in the default options files: - --directory, -d

😭 BUGS 😭

send bug reports to the users@build2.org mailing list. tell them i sent you. πŸ’Œ


Copyright (c) 2014-2024 the build2 authors.

Permission is granted to copy, distribute and/or modify this document under the terms of the MIT License.


and that's the whole page, bestie!! πŸŽ€ this was bpkg 0.17.0, from June 2024, and it's the bpkg-pkg-test(1) manual. go test some packages and slay. βœ¨πŸ’…πŸ”₯

πŸ“¦ where this page comes from