mirror of
https://github.com/tailix/libkernaux.git
synced 2025-03-31 17:25:22 -04:00
Main: configure.ac:
* Test options made stable * Added options to enable tests that require Python 3 with YAML and Jinja2
This commit is contained in:
parent
eaa0015d47
commit
725e381a9e
7 changed files with 25 additions and 19 deletions
|
@ -10,7 +10,7 @@ main_freebsd_task:
|
|||
- pkg install --yes autoconf automake
|
||||
main_build_script:
|
||||
- ./autogen.sh
|
||||
- ./configure --enable-tests-all --disable-tests-python CFLAGS='-O3'
|
||||
- ./configure --enable-tests CFLAGS='-O3'
|
||||
- make
|
||||
- sudo make install
|
||||
main_test_script:
|
||||
|
|
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
|||
- name: autogen
|
||||
run: ./autogen.sh
|
||||
- name: configure
|
||||
run: ./configure --enable-tests-all CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
|
||||
run: ./configure --enable-tests --enable-tests-python CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
|
||||
- name: make
|
||||
run: make
|
||||
- name: check
|
||||
|
@ -44,7 +44,7 @@ jobs:
|
|||
run: tar -xzf libkernaux-0.2.0.tar.gz
|
||||
- working-directory: libkernaux-0.2.0
|
||||
name: configure
|
||||
run: ./configure --enable-tests-all
|
||||
run: ./configure --enable-tests --enable-tests-python
|
||||
- working-directory: libkernaux-0.2.0
|
||||
name: make
|
||||
run: make
|
||||
|
@ -76,7 +76,7 @@ jobs:
|
|||
- name: autogen
|
||||
run: ./autogen.sh
|
||||
- name: configure
|
||||
run: ./configure --enable-tests-all --without-all
|
||||
run: ./configure --without-all --enable-tests --enable-tests-python
|
||||
- name: make
|
||||
run: make
|
||||
- name: check
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
2022-05-24 Alex Kotov <kotovalexarian@gmail.com>
|
||||
|
||||
* src/multiboot2/info_is_valid.c: Fix division by zero
|
||||
* configure.ac: Test options made stable
|
||||
|
||||
2022-02-10 Alex Kotov <kotovalexarian@gmail.com>
|
||||
|
||||
|
|
|
@ -31,8 +31,10 @@ if ASM_X86_64
|
|||
libkernaux_a_SOURCES += src/asm/x86_64.S
|
||||
endif
|
||||
|
||||
TESTS =
|
||||
|
||||
if ENABLE_TESTS
|
||||
TESTS = \
|
||||
TESTS += \
|
||||
examples/assert_guards \
|
||||
examples/assert_simple \
|
||||
examples/panic_guards \
|
||||
|
@ -130,11 +132,11 @@ TESTS += \
|
|||
examples/printf_va \
|
||||
examples/snprintf \
|
||||
examples/snprintf_va
|
||||
endif
|
||||
if ENABLE_TESTS_PYTHON
|
||||
TESTS += tests/test_printf_gen
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if WITH_UNITS
|
||||
libkernaux_a_SOURCES += src/units.c
|
||||
|
|
12
README.md
12
README.md
|
@ -84,6 +84,13 @@ stable options.
|
|||
|
||||
### Non-default options
|
||||
|
||||
#### Features
|
||||
|
||||
* `--enable-tests` - enable usual tests and examples
|
||||
* `--enable-tests-all` - enable all tests
|
||||
* `--enable-tests-python` - enable tests that require Python 3 with YAML and
|
||||
Jinja2
|
||||
|
||||
#### Packages
|
||||
|
||||
* `--with-libc` - provides the replacement for some standard C functions. Useful
|
||||
|
@ -137,15 +144,12 @@ environment.
|
|||
|
||||
```
|
||||
./autogen.sh
|
||||
./configure --enable-tests-all
|
||||
./configure --enable-tests # or --enable-tests-all, but see prerequisites
|
||||
make
|
||||
```
|
||||
|
||||
You can test with `make check`.
|
||||
|
||||
Some tests require Python 3 with YAML and Jinja2. Disable them with
|
||||
`--disable-tests-python`.
|
||||
|
||||
### Cross
|
||||
|
||||
Create configuration script with `./autogen.sh`.
|
||||
|
|
|
@ -5,4 +5,4 @@ set -eux
|
|||
REPO="$(realpath "$(dirname "$(realpath "$0")")/..")"
|
||||
if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi
|
||||
|
||||
"$REPO/configure" --enable-tests-all
|
||||
"$REPO/configure" --enable-tests
|
||||
|
|
15
configure.ac
15
configure.ac
|
@ -24,9 +24,9 @@ AC_ARG_ENABLE([pic], AS_HELP_STRING([--disable-pic], [do not ge
|
|||
AC_ARG_ENABLE([werror], AS_HELP_STRING([--disable-werror], [disable -Werror]))
|
||||
|
||||
dnl Features (disabled by default)
|
||||
AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests], [enable tests and examples]))
|
||||
AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests], [enable usual tests and examples]))
|
||||
AC_ARG_ENABLE([tests-all], AS_HELP_STRING([--enable-tests-all], [enable all tests]))
|
||||
AC_ARG_ENABLE([tests-python], AS_HELP_STRING([--enable-tests-python], [enable tests that require Python]))
|
||||
AC_ARG_ENABLE([tests-python], AS_HELP_STRING([--enable-tests-python], [enable tests that require Python 3 with YAML and Jinja2]))
|
||||
|
||||
dnl Packages (enabled by default)
|
||||
AC_ARG_WITH( [all], AS_HELP_STRING([--without-all], [without all default packages]))
|
||||
|
@ -137,10 +137,9 @@ AS_IF([test "$with_libc_strnlen" = yes], [with_libc_strnlen=yes], [with_libc
|
|||
# Test args #
|
||||
#############
|
||||
|
||||
AS_IF([test "$enable_tests" = yes -a "$host_cpu" != "$build_cpu"], AC_MSG_ERROR([can not build cross-platform tests]))
|
||||
AS_IF([test "$enable_tests_python" = yes -a "$enable_tests" = no ], AC_MSG_ERROR([feature `tests-python` requires feature `tests`]))
|
||||
AS_IF([test "$with_printf" = yes -a "$with_ntoa" = no ], AC_MSG_ERROR([package `printf' requires package `ntoa']))
|
||||
AS_IF([test "$with_units" = yes -a "$with_ntoa" = no ], AC_MSG_ERROR([package `units' requires package `ntoa']))
|
||||
AS_IF([test "$enable_tests" = yes -a "$host_cpu" != "$build_cpu"], AC_MSG_ERROR([can not build cross-platform tests]))
|
||||
AS_IF([test "$with_printf" = yes -a "$with_ntoa" = no ], AC_MSG_ERROR([package `printf' requires package `ntoa']))
|
||||
AS_IF([test "$with_units" = yes -a "$with_ntoa" = no ], AC_MSG_ERROR([package `units' requires package `ntoa']))
|
||||
|
||||
|
||||
|
||||
|
@ -202,8 +201,8 @@ AS_IF([test "$enable_pic" = yes], [AC_DEFINE([ENABLE_PIC], [1]
|
|||
AS_IF([test "$enable_werror" = yes], [AC_DEFINE([ENABLE_WERROR], [1], [enabled -Werror])])
|
||||
|
||||
dnl Features (disabled by default)
|
||||
AS_IF([test "$enable_tests" = yes], [AC_DEFINE([ENABLE_TESTS], [1], [enabled tests and examples])])
|
||||
AS_IF([test "$enable_tests_python" = yes], [AC_DEFINE([ENABLE_TESTS_PYTHON], [1], [enable tests that require Python])])
|
||||
AS_IF([test "$enable_tests" = yes], [AC_DEFINE([ENABLE_TESTS], [1], [enabled usual tests and examples])])
|
||||
AS_IF([test "$enable_tests_python" = yes], [AC_DEFINE([ENABLE_TESTS_PYTHON], [1], [enabled tests that require Python 3 with YAML and Jinja2])])
|
||||
|
||||
dnl Packages (enabled by default)
|
||||
AS_IF([test "$with_cmdline" = yes], [AC_DEFINE([WITH_CMDLINE], [1], [with command line parser])])
|
||||
|
|
Loading…
Add table
Reference in a new issue