agentsclimarketplace

Meson testing installation

Skill krxecs/meson-skills/skills/meson-testing-installation

Run tests and install build targets using Meson. Use this skill whenever the user wants to run tests, debug test failures, filter tests by suite or name, set up CI test pipelines, or install to a custom prefix or staging directory — even if they just say "how do I run only unit tests" or "how do I install to /opt".From its SKILL.md

Install
npx -y skills add krxecs/meson-skills --skill meson-testing-installation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, 657 tokens by cl100k_base, as published. Nobody here has run it

Meson Testing & Installation

meson test runs project tests, and meson install puts built artifacts into their final location. For pkg-config exports, release tarballs, and packaging layout, use meson-package-export-distribution.

Runnable examples live under this skill's examples/ directory.

Quick Start

Run all tests:

meson test -C build

List available tests:

meson test -C build --list

Run specific test:

meson test -C build test_name

Install project:

meson install -C build

Dry-run (see what would be installed):

meson install -C build --dry-run

Why tests and installs are separate

Testing answers “does it work here?” Installation answers “does the project stage correctly?”

A healthy project should prove both.

meson test: Reference

Basic syntax

meson test [options] [test_names...]

Common options

OptionPurpose
-C BUILDDIRBuild directory
--listList available tests (don't run)
-j JOBSParallel test jobs
-v, --verboseVerbose output
--no-rebuildDon't rebuild before testing
--gdbRun failing tests under gdb
--benchmarkRun benchmark tests
--suite SUITERun only one suite
--print-errorlogsPrint failing test logs

Test suites

Use suites to keep test categories readable:

  • unit
  • integration
  • slow
  • compile
  • install

Example:

test('core', core_test, suite: 'unit')

Install patterns

Install with custom prefix

meson setup build --prefix=/opt/myapp
meson install -C build

Install into a package root

meson install -C build --destdir "$pkgdir"

Use a staging tree in CI

meson install -C build --destdir "$PWD/stage"

Common install helpers

  • install_headers()
  • install_man()
  • install_data()
  • install_subdir()
  • install_symlink()
  • install_emptydir()

Install checklist

  • public headers installed intentionally
  • shared library versioning set if the ABI is stable
  • pkg-config metadata exported if downstream users need it
  • private files kept out of the public prefix
  • staging installs tested in CI

Common mistakes

  • confusing “built successfully” with “installed correctly”
  • forgetting install: true on the target that should ship
  • letting tests depend on the source directory layout
  • writing tests that require a full install when a build-tree test would be simpler
  • failing to check the install tree in CI

What ships with it: 9 files

4.9 KB alongside SKILL.md

Keep looking

Skills are one crate of 326,736. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.