Skip to content

Commit 1d3c88c

Browse files
committed
Worked on tests and changes for CI tests
1 parent 8a8ee0e commit 1d3c88c

11 files changed

Lines changed: 47 additions & 159 deletions

File tree

.github/workflows/build_windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Install Cygwin and build dependencies
4545
uses: cygwin/cygwin-install-action@v6
4646
with:
47-
packages: autoconf, automake, binutils, gcc-core, gettext-devel, git, libtool, make, pkg-config
47+
packages: autoconf, automake, binutils, curl, gcc-core, gettext-devel, git, libtool, make, pkg-config
4848
platform: x86_64
4949
add-to-path: true
5050
- name: Download test data
@@ -87,7 +87,7 @@ jobs:
8787
with:
8888
msystem: MINGW64
8989
update: true
90-
install: autoconf automake gettext gettext-devel git libtool make mingw-w64-x86_64-gcc pkg-config
90+
install: autoconf automake curl git libtool make mingw-w64-x86_64-gcc mingw-w64-x86_64-gettext-runtime mingw-w64-x86_64-gettext-tools pkg-config
9191
- name: Download test data
9292
shell: msys2 {0}
9393
run: |

.github/workflows/check_source.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
make > /dev/null
3434
- name: Run tests
3535
run: |
36-
make check CHECK_WITH_ASAN=1 CHECK_WITH_STDERR=1
36+
tests/runtests.sh
3737
scan_build:
3838
name: Check source with scan-build
3939
runs-on: ${{ matrix.os }}
@@ -124,4 +124,4 @@ jobs:
124124
make > /dev/null
125125
- name: Run tests
126126
run: |
127-
make check CHECK_WITH_STDERR=1
127+
tests/runtests.sh

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install Cygwin and build dependencies
2020
uses: cygwin/cygwin-install-action@v6
2121
with:
22-
packages: autoconf, automake, curl, gettext-devel, git, libtool, make, mingw-w64-x86_64-gcc, pkg-config
22+
packages: autoconf, automake, binutils, curl, gcc-core, gettext-devel, git, libtool, make, pkg-config
2323
platform: x86_64
2424
add-to-path: true
2525
- name: Download test data
@@ -119,7 +119,7 @@ jobs:
119119
with:
120120
msystem: MINGW64
121121
update: true
122-
install: autoconf automake gettext gettext-devel git libtool make mingw-w64-x86_64-gcc pkg-config
122+
install: autoconf automake curl git libtool make mingw-w64-x86_64-gcc mingw-w64-x86_64-gettext-runtime mingw-w64-x86_64-gettext-tools pkg-config
123123
- name: Download test data
124124
shell: msys2 {0}
125125
run: |

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
[libfvalue],
5-
[20260531],
5+
[20260601],
66
[joachim.metz@gmail.com])
77

88
AC_CONFIG_SRCDIR(

libfvalue/libfvalue_extern.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@
2424

2525
#include <common.h>
2626

27+
#if !defined( __CYGWIN__ ) && !defined( _WIN32 ) && defined( __has_attribute )
28+
#if __has_attribute( visibility )
29+
#define LIBFVALUE_INTERNAL __attribute__((visibility("hidden"))) extern
30+
31+
#else
32+
#define LIBFVALUE_INTERNAL extern
33+
34+
#endif /* __has_attribute( visibility ) */
35+
#else
36+
#define LIBFVALUE_INTERNAL extern
37+
38+
#endif /* !defined( __CYGWIN__ ) && !defined( _WIN32 ) && defined( __has_attribute ) */
39+
2740
/* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue
2841
*/
2942
#if !defined( HAVE_LOCAL_LIBFVALUE )
@@ -32,7 +45,7 @@
3245

3346
#else
3447
#define LIBFVALUE_EXTERN /* extern */
35-
#define LIBFVALUE_EXTERN_VARIABLE extern
48+
#define LIBFVALUE_EXTERN_VARIABLE LIBFVALUE_INTERNAL
3649

3750
#endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */
3851

libfvalue/libfvalue_value.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ int libfvalue_value_initialize_data(
11601160
goto on_error;
11611161
}
11621162
#if defined( __clang_analyzer__ )
1163-
__builtin_assume( ( (libfvalue_internal_data_handle_t *) internal_value->data_handle )->data == data );
1163+
free( data );
11641164
#endif
11651165
return( 1 );
11661166

m4/tests.m4

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

55
dnl Function to detect whether the file system is case-insensitive
66
AC_DEFUN([AX_TEST_CHECK_FILE_SYSTEM_IS_CASE_INSENSITIVE],
@@ -183,15 +183,19 @@ AC_DEFUN([AX_TESTS_CHECK_LOCAL],
183183
dl,
184184
dlsym)
185185
186-
AX_TEST_CHECK_FILE_SYSTEM_IS_CASE_INSENSITIVE
187-
188186
AS_IF(
189187
[test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes],
190188
[AC_DEFINE(
191189
[HAVE_GNU_DL_DLSYM],
192190
[1],
193191
[Define to 1 if dlsym function is available in GNU dl.])
194192
])
193+
194+
AX_TEST_CHECK_FILE_SYSTEM_IS_CASE_INSENSITIVE
195+
196+
AC_SUBST(
197+
[TESTS_USE_WINAPI],
198+
[$ac_cv_enable_winapi])
195199
])
196200

197201
dnl Function to detect if OSS-Fuzz build environment is available

runtests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# Script that runs the tests
33
#
4-
# Version: 20260529
4+
# Version: 20260531
55

66
EXIT_SUCCESS=0
77
EXIT_FAILURE=1
@@ -92,7 +92,7 @@ run_configure_make_check_with_asan()
9292
return ${RESULT}
9393
fi
9494

95-
make check CHECK_WITH_ASAN=1 CHECK_WITH_STDERR=1
95+
make check CHECK_WITH_STDERR=1
9696
RESULT=$?
9797

9898
if test ${RESULT} -ne ${EXIT_SUCCESS}

tests/lsan.suppressions

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/test_library.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# Tests library functions and types.
33
#
4-
# Version: 20260509
4+
# Version: 20260531
55

66
EXIT_SUCCESS=0;
77
EXIT_FAILURE=1;
@@ -99,11 +99,6 @@ run_test_with_input()
9999
do
100100
OPTION_INPUT_FILE="${INPUT_FILE}";
101101

102-
if test "${OSTYPE}" = "msys";
103-
then
104-
# A test executable built with MinGW expects a Windows path.
105-
INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`;
106-
fi
107102
local TESTED_WITH_OPTIONS=0;
108103

109104
for OPTION_SET in ${OPTION_SETS[@]};

0 commit comments

Comments
 (0)