Andrew Jeffery | 1b1b728 | 2024-06-04 00:14:46 +0930 | [diff] [blame^] | 1 | #!/usr/bin/sh |
| 2 | set -eu |
| 3 | |
| 4 | BUILD="$(mktemp --directory --tmpdir=.)" |
| 5 | trap '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. |
| 10 | meson setup -Dabi-compliance-check=disabled "$BUILD" |
| 11 | meson compile -C "$BUILD" |
| 12 | meson 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. |
| 19 | meson configure --buildtype=release "$BUILD" |
| 20 | meson compile -C "$BUILD" |
| 21 | meson test -C "$BUILD" |
| 22 | |
| 23 | # Ensure the test suite links when testing symbols are removed from the ABI |
| 24 | meson configure --buildtype=debug "$BUILD" |
| 25 | meson configure -Dabi=deprecated,stable "$BUILD" |
| 26 | meson compile -C "$BUILD" |
| 27 | meson test -C "$BUILD" |