Skip to content

Commit 063c991

Browse files
committed
Replaced test scripts with autotest
1 parent dfe1aae commit 063c991

32 files changed

Lines changed: 1721 additions & 9474 deletions

.github/workflows/build_freebsd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
usesh: true
2020
mem: 4096
2121
prepare: |
22-
pkg install -y autoconf automake bash curl gettext git libtool openssl pkgconf
22+
pkg install -y autoconf automake curl gettext git libtool openssl pkgconf
2323
- name: Download test data
2424
shell: freebsd {0}
2525
run: |
@@ -32,8 +32,8 @@ jobs:
3232
./synclibs.sh --use-head
3333
./autogen.sh
3434
./configure ${{ matrix.configure_options }}
35-
make > /dev/null
35+
make -j4 > /dev/null
3636
- name: Run tests
3737
shell: freebsd {0}
3838
run: |
39-
tests/runtests.sh CHECK_WITH_STDERR=1
39+
tests/runtests.sh -j4 VERBOSE=1

.github/workflows/build_linux.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
./synclibs.sh --use-head
4848
./autogen.sh
4949
./configure ${{ matrix.configure_options }}
50-
make > /dev/null
50+
make -j4 > /dev/null
5151
- name: Run tests
5252
run: |
53-
tests/runtests.sh CHECK_WITH_STDERR=1
53+
tests/runtests.sh -j4 VERBOSE=1
5454
build_dist:
5555
runs-on: ${{ matrix.os }}
5656
strategy:
@@ -75,10 +75,10 @@ jobs:
7575
./synclibs.sh --use-head
7676
./autogen.sh
7777
./configure ${{ matrix.configure_options }}
78-
make > /dev/null
78+
make -j4 > /dev/null
7979
- name: Run tests
8080
run: |
81-
make distcheck VERBOSE=1
81+
make distcheck AM_MAKEFLAGS="-j4" VERBOSE=1
8282
build_python:
8383
runs-on: ${{ matrix.os }}
8484
strategy:
@@ -104,12 +104,12 @@ jobs:
104104
./synclibs.sh --use-head
105105
./autogen.sh
106106
./configure ${{ matrix.configure_options }}
107-
make > /dev/null
107+
make -j4 > /dev/null
108108
- name: Run tests
109109
env:
110110
PYTHON_VERSION: ${{ matrix.python_version }}
111111
run: |
112-
tests/runtests.sh CHECK_WITH_STDERR=1
112+
tests/runtests.sh -j4 VERBOSE=1
113113
build_pyproject:
114114
runs-on: ${{ matrix.os }}
115115
strategy:
@@ -131,7 +131,7 @@ jobs:
131131
./synclibs.sh --use-head
132132
./autogen.sh
133133
./configure ${{ matrix.configure_options }}
134-
make > /dev/null
134+
make -j4 > /dev/null
135135
- name: Build Python module
136136
run: |
137137
python -m build
@@ -162,7 +162,7 @@ jobs:
162162
./synclibs.sh --use-head
163163
./autogen.sh
164164
./configure ${{ matrix.configure_options }}
165-
make > /dev/null
165+
make -j4 > /dev/null
166166
- name: Run tests
167167
run: |
168-
tests/runtests.sh CHECK_WITH_STDERR=1
168+
tests/runtests.sh -j4 VERBOSE=1

.github/workflows/build_macos.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
./synclibs.sh --use-head
4343
./autogen.sh
4444
./configure ${{ matrix.configure_options }}
45-
make > /dev/null
45+
make -j4 > /dev/null
4646
- name: Run tests
4747
run: |
48-
tests/runtests.sh CHECK_WITH_STDERR=1
48+
tests/runtests.sh -j4 VERBOSE=1
4949
build_python:
5050
runs-on: ${{ matrix.os }}
5151
strategy:
@@ -71,10 +71,10 @@ jobs:
7171
./synclibs.sh --use-head
7272
./autogen.sh
7373
./configure ${{ matrix.configure_options }}
74-
make > /dev/null
74+
make -j4 > /dev/null
7575
- name: Run tests
7676
run: |
77-
tests/runtests.sh CHECK_WITH_STDERR=1
77+
tests/runtests.sh -j4 VERBOSE=1
7878
build_pkgbuild:
7979
runs-on: ${{ matrix.os }}
8080
strategy:
@@ -100,7 +100,7 @@ jobs:
100100
./synclibs.sh --use-head
101101
./autogen.sh
102102
./configure ${{ matrix.configure_options }}
103-
make > /dev/null
103+
make -j4 > /dev/null
104104
- name: Build pkg
105105
run: |
106106
tests/pkgbuild.sh

.github/workflows/build_windows.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ jobs:
6666
./synclibs.sh --use-head
6767
./autogen.sh
6868
./configure ${CONFIGURE_OPTIONS}
69-
make > /dev/null
69+
make -j4 > /dev/null
7070
- name: Run tests
7171
shell: bash --login -e -o pipefail -o igncr {0}
7272
working-directory: ${{ github.workspace }}
7373
env:
7474
CHERE_INVOKING: 1
7575
run: |
76-
tests/runtests.sh CHECK_WITH_STDERR=1
76+
tests/runtests.sh -j4 VERBOSE=1
7777
build_msys2_mingw:
7878
runs-on: windows-latest
7979
strategy:
@@ -83,6 +83,8 @@ jobs:
8383
- configure_options: '--enable-winapi'
8484
- configure_options: '--disable-nls --disable-shared-libs --enable-python'
8585
steps:
86+
- name: Configure git
87+
run: git config --global core.autocrlf false
8688
- uses: actions/checkout@v6
8789
- name: Set up MSYS2 with MinGW-w64
8890
uses: msys2/setup-msys2@v2
@@ -102,8 +104,8 @@ jobs:
102104
./synclibs.sh --use-head
103105
./autogen.sh
104106
./configure ${CONFIGURE_OPTIONS}
105-
make > /dev/null
107+
make -j4 > /dev/null
106108
- name: Run tests
107109
shell: msys2 {0}
108110
run: |
109-
tests/runtests.sh CHECK_WITH_STDERR=1
111+
tests/runtests.sh -j4 VERBOSE=1

.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-
tests/runtests.sh CHECK_WITH_STDERR=1
36+
tests/runtests.sh VERBOSE=1
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-
tests/runtests.sh CHECK_WITH_STDERR=1
127+
tests/runtests.sh VERBOSE=1

.github/workflows/coverage.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
env:
4848
CHERE_INVOKING: 1
4949
run: |
50-
tests/runtests.sh CHECK_WITH_STDERR=1
50+
tests/runtests.sh VERBOSE=1
5151
- name: Generate coverage data
5252
shell: bash --login -e -o pipefail -o igncr {0}
5353
working-directory: ${{ github.workspace }}
@@ -95,7 +95,7 @@ jobs:
9595
make > /dev/null
9696
- name: Run tests
9797
run: |
98-
make check CHECK_WITH_STDERR=1 SKIP_TOOLS_END_TO_END_TESTS=1
98+
make check SKIP_TOOLS_END_TO_END_TESTS=1 VERBOSE=1
9999
- name: Generate coverage data
100100
run: |
101101
for DIRECTORY in `find . -maxdepth 1 -type d`; do \
@@ -115,6 +115,8 @@ jobs:
115115
- configure_options: '--enable-code-coverage --enable-winapi --with-openssl=no'
116116
codecov_name: 'mingw-w64-gcc-no-optimization'
117117
steps:
118+
- name: Configure git
119+
run: git config --global core.autocrlf false
118120
- uses: actions/checkout@v6
119121
- name: Set up MSYS2 with MinGW-w64
120122
uses: msys2/setup-msys2@v2
@@ -138,7 +140,7 @@ jobs:
138140
- name: Run tests
139141
shell: msys2 {0}
140142
run: |
141-
tests/runtests.sh CHECK_WITH_STDERR=1
143+
tests/runtests.sh VERBOSE=1
142144
- name: Generate coverage data
143145
shell: msys2 {0}
144146
run: |

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Files to ignore by git
22
#
3-
# Version: 20251129
3+
# Version: 20260604
44

55
# Generic auto-generated build files
66
*~
@@ -128,7 +128,12 @@ stamp-h[1-9]
128128
/libcaes/libcaes.rc
129129
/libcaes/libcaes_definitions.h
130130
/pyproject.toml
131+
/tests/*.dir
131132
/tests/*.exe
133+
/tests/*.log
134+
/tests/*.tmp
135+
/tests/atconfig
136+
/tests/atlocal
132137
/tests/caes_test_context
133138
/tests/caes_test_crypt_cbc
134139
/tests/caes_test_crypt_ccm
@@ -137,6 +142,10 @@ stamp-h[1-9]
137142
/tests/caes_test_error
138143
/tests/caes_test_support
139144
/tests/caes_test_tweaked_context
145+
/tests/package.m4
146+
/tests/test_library
147+
/tests/test_manpages
148+
/tests/test_python_module
140149
/tests/tmp*
141150

142151
# Local library dependencies specific files

Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ pkgconfigdir = $(libdir)/pkgconfig
6262
pkgconfig_DATA = \
6363
libcaes.pc
6464

65+
check-build: all
66+
cd $(srcdir)/tests && $(MAKE) check-build $(AM_MAKEFLAGS)
67+
6568
libtool: @LIBTOOL_DEPS@
6669
cd $(srcdir) && $(SHELL) ./config.status --recheck
6770

common/config_winapi.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636

3737
/* Define to the address where bug reports for this package should be sent.
3838
*/
39-
#define PACKAGE_BUGREPORT "joachim.metz@gmail.com"
39+
#if !defined( PACKAGE_BUGREPORT )
40+
#define PACKAGE_BUGREPORT "https://github.com/libyal/libcaes/issues"
41+
#endif
4042

4143
/* Define the size of the integer for WINAPI
4244
*/

configure.ac

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ AC_PREREQ([2.71])
22

33
AC_INIT(
44
[libcaes],
5-
[20260608],
6-
[joachim.metz@gmail.com])
5+
[20260611],
6+
[https://github.com/libyal/libcaes/issues])
77

88
AC_CONFIG_SRCDIR(
99
[include/libcaes.h.in])
@@ -13,6 +13,8 @@ AM_EXTRA_RECURSIVE_TARGETS([sources splint])
1313

1414
AC_CONFIG_MACRO_DIR([m4])
1515

16+
AC_CONFIG_TESTDIR([tests])
17+
1618
dnl Check for host type
1719
AC_CANONICAL_HOST
1820

@@ -142,6 +144,8 @@ AC_CONFIG_FILES([libcaes/libcaes.rc])
142144
AC_CONFIG_FILES([libcaes.pc])
143145
AC_CONFIG_FILES([libcaes.spec])
144146
AC_CONFIG_FILES([pyproject.toml])
147+
dnl Generate test configuration files
148+
AC_CONFIG_FILES([tests/atlocal])
145149
dnl Generate a source configuration file
146150
AC_CONFIG_HEADERS([common/config.h])
147151

0 commit comments

Comments
 (0)