Skip to content

Commit

Permalink
Allow running tests when static library is disabled
Browse files Browse the repository at this point in the history
We then only run a subset of the tests, but still better than failing to
build.

Signed-off-by: Steffen Jaeckel <[email protected]>
  • Loading branch information
sjaeckel committed Aug 9, 2023
1 parent f13ea6e commit 9eba8e8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- { configure: '--disable-tls' }
- { configure: '--enable-cares' }
- { configure: '--disable-getrandom' }
- { configure: '--disable-static' }
name: Regular Tests
steps:
- uses: actions/checkout@v2
Expand Down
22 changes: 14 additions & 8 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,29 @@ endif


## Tests
TESTS = \
STATIC_TESTS = \
tests/check_parser \
tests/test_hash \
tests/test_jid \
tests/test_ctx \
tests/test_send_queue \
tests/test_string \
tests/test_resolver

TESTS = \
tests/test_sha1 \
tests/test_sha256 \
tests/test_sha512 \
tests/test_md5 \
tests/test_rand \
tests/test_scram \
tests/test_ctx \
tests/test_base64 \
tests/test_hash \
tests/test_jid \
tests/test_send_queue \
tests/test_snprintf \
tests/test_string \
tests/test_stanza \
tests/test_resolver
tests/test_stanza

if !DISABLE_STATIC
TESTS += $(STATIC_TESTS)
endif

if !DISABLE_TLS
TESTS += tests/test_xmppaddr
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR],

AM_CONDITIONAL([PARSER_EXPAT], [test x$with_parser != xlibxml2])
AM_CONDITIONAL([DISABLE_TLS], [test x$enable_tls = xno])
AM_CONDITIONAL([DISABLE_STATIC], [test x$enable_static = xno])
AM_CONDITIONAL([NEED_SNPRINTF], [test x$have_snprintf = xno])
AM_CONDITIONAL([TLS_WITH_GNUTLS], [test x$with_gnutls = xyes])
AM_CONDITIONAL([TLS_WITH_SCHANNEL], [test x$with_schannel = xyes])
Expand Down

0 comments on commit 9eba8e8

Please sign in to comment.