Skip to content

Commit 341c261

Browse files
committed
Worked on tests and changes for CI tests
1 parent 24314ad commit 341c261

11 files changed

Lines changed: 38 additions & 13 deletions

.github/workflows/build_package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
container:
1414
image: ubuntu:${{ matrix.version }}
1515
steps:
16-
- uses: actions/checkout@v6
1716
- name: Set up container
1817
env:
1918
DEBIAN_FRONTEND: noninteractive
@@ -26,6 +25,7 @@ jobs:
2625
run: |
2726
apt update -q
2827
apt install -y autoconf automake autopoint autotools-dev build-essential debhelper dh-autoreconf dh-python fakeroot git libtool pkg-config python3-dev python3-setuptools
28+
- uses: actions/checkout@v6
2929
- name: Download test data
3030
run: |
3131
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
@@ -50,13 +50,13 @@ jobs:
5050
container:
5151
image: registry.fedoraproject.org/fedora:${{ matrix.version }}
5252
steps:
53-
- uses: actions/checkout@v6
5453
- name: Set up container
5554
run: |
5655
dnf install -y dnf-plugins-core langpacks-en
5756
- name: Install build dependencies
5857
run: |
5958
dnf install -y @development-tools autoconf automake gettext-devel git libtool make pkg-config python3-devel python3-setuptools rpm-build
59+
- uses: actions/checkout@v6
6060
- name: Download test data
6161
run: |
6262
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AC_PREREQ([2.71])
22

33
AC_INIT(
44
[libwrc],
5-
[20260625],
5+
[20260705],
66
[https://github.com/libyal/libwrc/issues])
77

88
AC_CONFIG_SRCDIR(

dpkg/source/local-options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
extend-diff-ignore = "(^|/)\.codecov\.yml$"
2+
extend-diff-ignore = "(^|/)\.git($|/)"
23
extend-diff-ignore = "(^|/)\.github/.+$"
34
extend-diff-ignore = "(^|/)[^/]+\.(ini|nuspec|ps1|sh|yaml|yml)$"
45
extend-diff-ignore = "(^|/).+/Makefile.in$"

m4/tests.m4

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dnl Functions for testing
22
dnl
3-
dnl Version: 20260612
3+
dnl Version: 20260703
44

55
dnl Function to check if pthread_rwlock_unlock can be hooked for testing
66
AC_DEFUN([AX_TESTS_CHECK_CAN_HOOK_PTHREAD_RWLOCK_UNLOCK],
@@ -85,24 +85,25 @@ AC_DEFUN([AX_TESTS_CHECK_HAVE_MANPAGE_LINTER],
8585
8686
printf '.Dd June 10, 2026\n.Dt TITLE 1\n.Os\n.Sh NAME\n.Nm command\n.Nd example\n' > conftest.1
8787
88+
# Note that if man cannot set the locale it will exit with 0 but print to stderr
8889
AS_IF(
8990
[test "x$MAN" != x],
90-
[LC_ALL="en_US.UTF-8" MANROFFSEQ="" MANWIDTH="80" "$MAN" --warnings -E UTF-8 -l -Tutf8 -Z conftest.1 >/dev/null 2>&1
91+
[LC_ALL="en_US.UTF-8" MANROFFSEQ="" MANWIDTH="80" "$MAN" --warnings -E UTF-8 -l -Tutf8 -Z conftest.1 >/dev/null 2>conftest.err
9192
AS_IF(
92-
[test $? -eq 0],
93+
[test $? -eq 0 && ! test -s conftest.err],
9394
[ac_cv_have_manpage_linter="man-db"])
9495
])
9596
9697
AS_IF(
9798
[test "x$ac_cv_have_manpage_linter" = xno && test "x$MANDOC" != x],
98-
[LC_ALL="en_US.UTF-8" "$MANDOC" -O width=80 -T lint -W all ./conftest.1 >/dev/null 2>&1
99+
[LC_ALL="en_US.UTF-8" "$MANDOC" -O width=80 -T lint -W all ./conftest.1 >/dev/null 2>conftest.err
99100
100101
AS_IF(
101-
[test $? -eq 0],
102+
[test $? -eq 0 && ! test -s conftest.err],
102103
[ac_cv_have_manpage_linter="mandoc"])
103104
])
104105
105-
rm -f conftest.1
106+
rm -f conftest.1 conftest.err
106107
])
107108
])
108109

@@ -251,7 +252,7 @@ dnl Function to detect if tests dependencies are available
251252
AC_DEFUN([AX_TESTS_CHECK_LOCAL],
252253
[AC_CHECK_HEADERS([dlfcn.h])
253254
254-
AC_CHECK_FUNCS([fmemopen getopt mkstemp setenv tzset unlink])
255+
AC_CHECK_FUNCS([getopt mkstemp setenv tmpfile tzset unlink])
255256
256257
AC_CHECK_LIB(
257258
dl,

tests/Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,14 @@ test_tools: \
470470
test_tools.at
471471

472472
EXTRA_DIST = \
473-
$(check_AUTOTESTS:=.at) \
474473
$(check_SCRIPTS) \
475474
generate_test_inputs.sh \
476475
package.m4 \
477-
test_macros.at
476+
test_library.at \
477+
test_macros.at \
478+
test_manpages.at \
479+
test_python_module.at \
480+
test_tools.at
478481

479482
CLEANFILES = \
480483
$(check_AUTOTESTS) \

tests/wrc_test_io_handle.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,11 @@ int main(
439439

440440
return( EXIT_SUCCESS );
441441

442+
#if defined( __GNUC__ ) && !defined( LIBWRC_DLL_IMPORT )
443+
442444
on_error:
443445
return( EXIT_FAILURE );
446+
447+
#endif /* defined( __GNUC__ ) && !defined( LIBWRC_DLL_IMPORT ) */
444448
}
445449

tests/wrc_test_language_entry.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ int main(
110110

111111
return( EXIT_SUCCESS );
112112

113+
#if defined( __GNUC__ ) && !defined( LIBWRC_DLL_IMPORT )
114+
113115
on_error:
114116
return( EXIT_FAILURE );
117+
118+
#endif /* defined( __GNUC__ ) && !defined( LIBWRC_DLL_IMPORT ) */
115119
}
116120

tests/wrc_test_language_table.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,11 @@ int main(
436436

437437
return( EXIT_SUCCESS );
438438

439+
#if defined( __GNUC__ ) && !defined( LIBWRC_DLL_IMPORT )
440+
439441
on_error:
440442
return( EXIT_FAILURE );
443+
444+
#endif /* defined( __GNUC__ ) && !defined( LIBWRC_DLL_IMPORT ) */
441445
}
442446

tests/wrc_test_mui_values.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,11 @@ int main(
430430

431431
return( EXIT_SUCCESS );
432432

433+
#if defined( __GNUC__ ) && !defined( LIBWRC_DLL_IMPORT )
434+
433435
on_error:
434436
return( EXIT_FAILURE );
437+
438+
#endif /* defined( __GNUC__ ) && !defined( LIBWRC_DLL_IMPORT ) */
435439
}
436440

tests/wrc_test_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
#if !defined( LIBWRC_HAVE_BFIO )
4545

46-
extern \
46+
LIBWRC_EXTERN \
4747
int libwrc_stream_open_file_io_handle(
4848
libwrc_stream_t *stream,
4949
libbfio_handle_t *file_io_handle,

0 commit comments

Comments
 (0)