Skip to content

Commit

Permalink
tests: use meson and tap without sharness
Browse files Browse the repository at this point in the history
  • Loading branch information
johanmalm committed Jun 19, 2024
1 parent 00f9df6 commit 8d35d9e
Show file tree
Hide file tree
Showing 15 changed files with 235 additions and 1,164 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: |
pacman-key --init
pacman -Syu --noconfirm
pacman -S --noconfirm meson gcc clang pkgconf glib2 perl
pacman -S --noconfirm meson gcc clang pkgconf glib2
- name: Install FreeBSD dependencies
if: matrix.name == 'FreeBSD'
Expand All @@ -65,7 +65,7 @@ jobs:
usesh: true
prepare: |
sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
pkg install -y meson gcc pkgconf devel/glib20 devel/p5-Test-Harness
pkg install -y meson gcc pkgconf devel/glib20
run: echo "setup done"

- name: Install Void Linux dependencies
Expand All @@ -77,7 +77,7 @@ jobs:
/etc/xbps.d/*-repository-*.conf
xbps-install -Syu || xbps-install -yu xbps
xbps-install -Syu
xbps-install -y meson gcc clang pkg-config glib-devel make perl
xbps-install -y meson gcc clang pkg-config glib-devel patch
- name: Build with gcc
run: |
Expand All @@ -101,6 +101,5 @@ jobs:
run: |
echo '
cd "$GITHUB_WORKSPACE"
cp build-gcc/labwc-menu-generator .
make -C t/ prove
meson test --verbose -C build-gcc
' | $TARGET
32 changes: 0 additions & 32 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ executable(
)

subdir('data')
subdir('t')
60 changes: 0 additions & 60 deletions t/Makefile

This file was deleted.

57 changes: 0 additions & 57 deletions t/aggregate-results.sh

This file was deleted.

29 changes: 29 additions & 0 deletions t/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
test_lib = static_library(
'test_lib',
sources: files(
'tap.c',
'test-lib.c',
),
dependencies: [dependency('glib-2.0')],
)

tests = [
't1000.t.c',
't1001.t.c',
]

foreach t : tests
testname = t.split('.')[0].underscorify()
exe = executable(
testname,
sources: [t],
link_with: [test_lib],
)
test(
testname,
exe,
protocol: 'tap',
is_parallel: false,
)
endforeach

Loading

0 comments on commit 8d35d9e

Please sign in to comment.