mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
build: 'make check' errors out if file name limits would be hit.
* Makefile.am (SCM_TESTS, SH_TESTS, TESTS, AM_TESTS_ENVIRONMENT) (SCM_LOG_COMPILER, SH_LOG_COMPILER, AM_SCM_LOG_FLAGS) (AM_SH_LOG_FLAGS): Move within 'if CAN_RUN_TESTS'. (check-local) [!CAN_RUN_TESTS]: New target. * daemon.am (AM_TESTS_ENVIRONMENT, TESTS): Ditto. * m4/guix.m4 (GUIX_CHECK_FILE_NAME_LIMITS): Add parameter and set it.
This commit is contained in:
parent
27ab3cee75
commit
bb25130764
4 changed files with 47 additions and 14 deletions
45
Makefile.am
45
Makefile.am
|
@ -1,5 +1,5 @@
|
|||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2013 Andreas Enge <andreas@enge.fr>
|
||||
# Copyright © 2015 Alex Kost <alezost@gmail.com>
|
||||
#
|
||||
|
@ -135,6 +135,18 @@ MODULES = \
|
|||
guix.scm \
|
||||
$(GNU_SYSTEM_MODULES)
|
||||
|
||||
if HAVE_GUILE_JSON
|
||||
|
||||
MODULES += \
|
||||
guix/import/json.scm \
|
||||
guix/import/pypi.scm \
|
||||
guix/scripts/import/pypi.scm \
|
||||
guix/import/cpan.scm \
|
||||
guix/scripts/import/gem.scm \
|
||||
guix/import/gem.scm
|
||||
|
||||
endif
|
||||
|
||||
if BUILD_SYSCALLS_MODULE
|
||||
|
||||
MODULES += \
|
||||
|
@ -191,6 +203,11 @@ clean-go:
|
|||
-$(RM) -f $(GOBJECTS)
|
||||
|
||||
|
||||
# Test extensions; has to be unconditional.
|
||||
TEST_EXTENSIONS = .scm .sh
|
||||
|
||||
if CAN_RUN_TESTS
|
||||
|
||||
SCM_TESTS = \
|
||||
tests/base32.scm \
|
||||
tests/base64.scm \
|
||||
|
@ -233,14 +250,6 @@ SCM_TESTS = \
|
|||
|
||||
if HAVE_GUILE_JSON
|
||||
|
||||
MODULES += \
|
||||
guix/import/json.scm \
|
||||
guix/import/pypi.scm \
|
||||
guix/scripts/import/pypi.scm \
|
||||
guix/import/cpan.scm \
|
||||
guix/scripts/import/gem.scm \
|
||||
guix/import/gem.scm
|
||||
|
||||
SCM_TESTS += \
|
||||
tests/pypi.scm \
|
||||
tests/cpan.scm \
|
||||
|
@ -272,8 +281,6 @@ endif BUILD_DAEMON
|
|||
|
||||
TESTS = $(SCM_TESTS) $(SH_TESTS)
|
||||
|
||||
TEST_EXTENSIONS = .scm .sh
|
||||
|
||||
AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
|
||||
|
||||
SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
|
||||
|
@ -289,6 +296,22 @@ tests/guix-gc.log: \
|
|||
$(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
|
||||
$(SCM_TESTS:%.scm=%.log)
|
||||
|
||||
else !CAN_RUN_TESTS
|
||||
|
||||
TESTS =
|
||||
SH_TESTS =
|
||||
SCM_TESTS =
|
||||
|
||||
# Automake always generates a 'check' target, so better not override it.
|
||||
check-local:
|
||||
@echo
|
||||
@echo "Cannot run tests because file name limits would be exceeded." >&2
|
||||
@echo "Look for 'length' in the 'config.log' file for details." >&2
|
||||
@echo
|
||||
@exit 1
|
||||
|
||||
endif !CAN_RUN_TESTS
|
||||
|
||||
# Public key used to sign substitutes from hydra.gnu.org.
|
||||
dist_pkgdata_DATA = hydra.gnu.org.pub
|
||||
|
||||
|
|
|
@ -60,7 +60,8 @@ AC_SUBST([guix_localstatedir])
|
|||
AC_SUBST([guix_sysconfdir])
|
||||
AC_SUBST([guix_sbindir])
|
||||
|
||||
GUIX_CHECK_FILE_NAME_LIMITS
|
||||
GUIX_CHECK_FILE_NAME_LIMITS([can_run_tests])
|
||||
AM_CONDITIONAL([CAN_RUN_TESTS], [test "x$can_run_tests" = "xyes"])
|
||||
|
||||
dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
|
||||
dnl Make sure they are available.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Guix.
|
||||
#
|
||||
|
@ -208,12 +208,16 @@ EXTRA_DIST += \
|
|||
etc/guix-daemon.service.in \
|
||||
etc/guix-daemon.conf.in
|
||||
|
||||
if CAN_RUN_TESTS
|
||||
|
||||
AM_TESTS_ENVIRONMENT += \
|
||||
top_builddir="$(abs_top_builddir)"
|
||||
|
||||
TESTS += \
|
||||
tests/guix-daemon.sh
|
||||
|
||||
endif CAN_RUN_TESTS
|
||||
|
||||
clean-local:
|
||||
-if test -d "$(GUIX_TEST_ROOT)"; then \
|
||||
find "$(GUIX_TEST_ROOT)" | xargs chmod +w; \
|
||||
|
|
|
@ -215,7 +215,8 @@ AC_DEFUN([GUIX_TEST_HASH_BANG_LENGTH], [
|
|||
dnl GUIX_CHECK_FILE_NAME_LIMITS
|
||||
dnl
|
||||
dnl GNU/Linux has a couple of silly limits that we can easily run into.
|
||||
dnl Make sure everything is fine with the current settings.
|
||||
dnl Make sure everything is fine with the current settings. Set $1 to
|
||||
dnl 'yes' if tests can run, 'no' otherwise.
|
||||
AC_DEFUN([GUIX_CHECK_FILE_NAME_LIMITS], [
|
||||
AC_REQUIRE([GUIX_SOCKET_FILE_NAME_LENGTH])
|
||||
AC_REQUIRE([GUIX_TEST_SOCKET_FILE_NAME_LENGTH])
|
||||
|
@ -228,10 +229,14 @@ AC_DEFUN([GUIX_CHECK_FILE_NAME_LIMITS], [
|
|||
if test "$ac_cv_guix_test_socket_file_name_length" -ge ]SOCKET_FILE_NAME_LIMIT[; then
|
||||
AC_MSG_WARN([socket file name limit may be exceeded when running tests])
|
||||
fi
|
||||
|
||||
$1=yes
|
||||
if test "$ac_cv_guix_hash_bang_length" -ge ]LINUX_HASH_BANG_LIMIT[; then
|
||||
$1=no
|
||||
AC_MSG_ERROR([store directory '$storedir' would lead to overly long hash-bang lines])
|
||||
fi
|
||||
if test "$ac_cv_guix_test_hash_bang_length" -ge ]LINUX_HASH_BANG_LIMIT[; then
|
||||
$1=no
|
||||
AC_MSG_WARN([test directory '$ac_cv_guix_test_root' may lead to overly long hash-bang lines])
|
||||
fi
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue