Skip to content

Commit c2d46a1

Browse files
committed
tests: use meson and tap without sharness
1 parent 6892dfa commit c2d46a1

15 files changed

+236
-1164
lines changed

.github/workflows/build.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
run: |
5757
pacman-key --init
5858
pacman -Syu --noconfirm
59-
pacman -S --noconfirm meson gcc clang pkgconf glib2 perl
59+
pacman -S --noconfirm meson gcc clang pkgconf glib2
6060
6161
- name: Install FreeBSD dependencies
6262
if: matrix.name == 'FreeBSD'
@@ -65,7 +65,7 @@ jobs:
6565
usesh: true
6666
prepare: |
6767
sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
68-
pkg install -y meson gcc pkgconf devel/glib20 devel/p5-Test-Harness
68+
pkg install -y meson gcc pkgconf devel/glib20
6969
run: echo "setup done"
7070

7171
- name: Install Void Linux dependencies
@@ -77,7 +77,7 @@ jobs:
7777
/etc/xbps.d/*-repository-*.conf
7878
xbps-install -Syu || xbps-install -yu xbps
7979
xbps-install -Syu
80-
xbps-install -y meson gcc clang pkg-config glib-devel make perl
80+
xbps-install -y meson gcc clang pkg-config glib-devel patch
8181
8282
- name: Build with gcc
8383
run: |
@@ -101,6 +101,5 @@ jobs:
101101
run: |
102102
echo '
103103
cd "$GITHUB_WORKSPACE"
104-
cp build-gcc/labwc-menu-generator .
105-
make -C t/ prove
104+
meson test --verbose -C build-gcc
106105
' | $TARGET

Makefile

-32
This file was deleted.

meson.build

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ executable(
2020
)
2121

2222
subdir('data')
23+
subdir('t')

t/Makefile

-60
This file was deleted.

t/aggregate-results.sh

-57
This file was deleted.

t/meson.build

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
test_lib = static_library(
2+
'test_lib',
3+
sources: files(
4+
'tap.c',
5+
'test-lib.c',
6+
),
7+
dependencies: [dependency('glib-2.0')],
8+
)
9+
10+
tests = [
11+
't1000.t.c',
12+
't1001.t.c',
13+
]
14+
15+
foreach t : tests
16+
testname = t.split('.')[0].underscorify()
17+
exe = executable(
18+
testname,
19+
sources: [t],
20+
link_with: [test_lib],
21+
)
22+
test(
23+
testname,
24+
exe,
25+
protocol: 'tap',
26+
is_parallel: false,
27+
)
28+
endforeach
29+

0 commit comments

Comments
 (0)