blob: a06accf5ff43faa902f83a2542b0dce29acf74ad [file] [log] [blame]
Andrew Jeffery1b1b7282024-06-04 00:14:46 +09301#!/usr/bin/sh
2set -eu
3
4BUILD="$(mktemp --directory --tmpdir=.)"
5trap 'rm -rf "$BUILD"' EXIT
6
7# Ensure the test suite passes in the default configuration. Note
8# that we don't specify -Dabi=... - the default is equivalent to
9# -Dabi=deprecated,stable,testing.
10meson setup -Dabi-compliance-check=disabled "$BUILD"
11meson compile -C "$BUILD"
12meson test -C "$BUILD"
13
14# Ensure the test suite passes in release mode. libpldm specifies
15# -Db_ndebug=if-release by default, so building with --buildtype=release passes
16# -DNDEBUG to the compiler for the library implementation. This build
17# configuration will catch any unexpected changes in the library implementation
18# and incorrect test case implementations.
19meson configure --buildtype=release "$BUILD"
20meson compile -C "$BUILD"
21meson test -C "$BUILD"
22
23# Ensure the test suite links when testing symbols are removed from the ABI
24meson configure --buildtype=debug "$BUILD"
25meson configure -Dabi=deprecated,stable "$BUILD"
26meson compile -C "$BUILD"
27meson test -C "$BUILD"