texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * configure.ac (--enable-ptys-tests, PTYS_TESTS):


From: Patrice Dumas
Subject: branch master updated: * configure.ac (--enable-ptys-tests, PTYS_TESTS): add --enable-ptys-tests, replacing have_ptys with PTYS_TESTS conditional.
Date: Sun, 22 Sep 2024 05:34:24 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 0c17b80b6f * configure.ac (--enable-ptys-tests, PTYS_TESTS): add 
--enable-ptys-tests, replacing have_ptys with PTYS_TESTS conditional.
0c17b80b6f is described below

commit 0c17b80b6f725be36c24a99339b890f1dee921e4
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Sep 22 11:34:28 2024 +0200

    * configure.ac (--enable-ptys-tests, PTYS_TESTS): add
    --enable-ptys-tests, replacing have_ptys with PTYS_TESTS conditional.
    
    * info/Makefile.am (info_tests_with_pseudotty, info_tests, TESTS)
    (EXTRA_DIST): split TESTS in two, with info_tests_with_pseudotty tests
    that are only run if PTYS_TESTS is true.  That way
    --disable-ptys-tests is acknowledged even if there is a pseudotty
    program present in the info directory.
    
    * info/Makefile.am (CLEANFILES): add pseudotty to CLEANFILES if it is
    not built.
---
 ChangeLog            |  14 ++++++
 configure.ac         |  21 +++++++-
 info/Makefile.am     | 134 +++++++++++++++++++++++++++------------------------
 info/t/Init-test.inc |   4 +-
 4 files changed, 108 insertions(+), 65 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5abe68cfe9..bb2a503393 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-09-22  Patrice Dumas  <pertusus@free.fr>
+
+       * configure.ac (--enable-ptys-tests, PTYS_TESTS): add
+       --enable-ptys-tests, replacing have_ptys with PTYS_TESTS conditional.
+
+       * info/Makefile.am (info_tests_with_pseudotty, info_tests, TESTS)
+       (EXTRA_DIST): split TESTS in two, with info_tests_with_pseudotty tests
+       that are only run if PTYS_TESTS is true.  That way
+       --disable-ptys-tests is acknowledged even if there is a pseudotty
+       program present in the info directory.
+
+       * info/Makefile.am (CLEANFILES): add pseudotty to CLEANFILES if it is
+       not built.
+
 2024-09-21  Patrice Dumas  <pertusus@free.fr>
 
        * configure.ac (tp-tests): do not conditionalize tp tests on prove, it
diff --git a/configure.ac b/configure.ac
index 765b6179b8..7fc52b57d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,8 +248,25 @@ AC_TYPE_OFF_T
 # Checks for library functions.
 AC_CHECK_FUNCS(setlocale sigaction sigprocmask posix_openpt)
 
-# Used for Info tests
-AM_CONDITIONAL([have_ptys], [test x$ac_cv_func_posix_openpt = xyes])
+ptys_tests='yes'
+AC_ARG_ENABLE([ptys-tests],
+    AS_HELP_STRING([--enable-ptys-tests],[run tests using pseudottys (default: 
detected)]),
+    [if test $enableval = 'no'; then
+       ptys_tests='no'
+     else
+       ptys_tests='yes'
+     fi],
+    [
+     if test x$ac_cv_func_posix_openpt = xyes; then
+       ptys_tests='yes'
+     else
+       ptys_tests='no'
+     fi
+    ])
+
+AC_MSG_CHECKING([pseudottys tests requirements])
+AC_MSG_RESULT([$ptys_tests])
+AM_CONDITIONAL([PTYS_TESTS], [test "z$ptys_tests" = 'zyes'])
 
 # We want to recognize djgpp to avoid the useless warning about no
 # term library.
diff --git a/info/Makefile.am b/info/Makefile.am
index a54adc37b1..c91989b9b1 100644
--- a/info/Makefile.am
+++ b/info/Makefile.am
@@ -97,12 +97,67 @@ BUILT_SOURCES = funs.h
 
 # Test suite
 
-if have_ptys
-check_PROGRAMS = pseudotty
-pseudotty_SOURCES = pseudotty.c
-endif
+CLEANFILES =
+
+info_tests_with_pseudotty = \
+       t/adjust-anchors.sh \
+       t/all-only.sh \
+       t/anchor-positions.sh \
+       t/body-start.sh \
+       t/close-window-after-search.sh \
+       t/c-u-m-x-scroll-forward.sh \
+       t/dir-entry-to-subdir.sh \
+       t/dir-merge.sh \
+       t/echo-area-no-completions.sh \
+       t/empty-infopath.sh \
+       t/end-of-line.sh \
+       t/gc-split.sh \
+       t/goal-column.sh \
+       t/goto-quoted.sh \
+       t/inc-sea-bs.sh \
+       t/inc-sea-forward-nonregex.sh \
+       t/inc-sea-forward.sh \
+       t/inc-sea-history.sh \
+       t/inc-sea-insensitive.sh \
+       t/index-apropos.sh \
+       t/index-completing.sh \
+       t/index-long-nodeline.sh \
+       t/index-search.sh \
+       t/index.sh \
+       t/last-node-not-top-level.sh \
+       t/last-no-history.sh \
+       t/malformed-split.sh \
+       t/menu-sequence.sh \
+       t/multiple-completions.sh \
+       t/next-quoted.sh \
+       t/no-index.sh \
+       t/quoted-label-and-target.sh \
+       t/quoted-label-as-target.sh \
+       t/quoted-manual-in-label.sh \
+       t/quoted-manual-in-target.sh \
+       t/quoted-target.sh \
+       t/recode-C-locale.sh \
+       t/relative-reference.sh \
+       t/replace-viewed.sh \
+       t/resize-in-completions.sh \
+       t/search-after-tag.sh \
+       t/search-empty.sh \
+       t/search-skip-screen.sh \
+       t/search-split-after-index.sh \
+       t/split-file-menu.sh \
+       t/split-footnotes.sh \
+       t/split-index.sh \
+       t/star-note-non-whitespace.sh \
+       t/tab-argument.sh \
+       t/tab-no-xref.sh \
+       t/tab.sh \
+       t/tab-skip-node.sh \
+       t/window-split-dir.sh \
+       t/xref-across-lines-2.sh \
+       t/xref-across-lines.sh \
+       t/xref-to-anchor.sh
 
-TESTS = \
+info_tests = \
        t/file.sh \
        t/file-node.sh \
        t/file-nodes.sh \
@@ -113,13 +168,11 @@ TESTS = \
        t/no-file.sh \
        t/node-no-file.sh \
        t/split.sh \
-       t/malformed-split.sh \
        t/relative-path.sh \
        t/file-relative-path.sh \
        t/dir.sh \
        t/dir-file.sh \
        t/dir-file-sloppily.sh \
-       t/dir-merge.sh \
        t/dir-nondir.sh \
        t/dir-no-file.sh \
        t/dir-file-menu.sh \
@@ -130,68 +183,25 @@ TESTS = \
        t/dir-menus-sloppily.sh \
        t/where-dir-file.sh \
        t/dir-dangling-entry.sh \
-       t/dir-entry-to-subdir.sh \
        t/spec-file-node.sh \
        t/spec-no-node.sh \
        t/spec-menu.sh \
-       t/all-only.sh \
        t/empty.sh \
-       t/tab.sh \
-       t/tab-argument.sh \
-       t/tab-no-xref.sh \
-       t/tab-skip-node.sh \
-       t/xref-across-lines.sh \
-       t/xref-across-lines-2.sh \
-       t/body-start.sh \
-       t/end-of-line.sh \
-       t/goal-column.sh \
-       t/star-note-non-whitespace.sh \
-       t/c-u-m-x-scroll-forward.sh \
-       t/last-no-history.sh \
-       t/split-footnotes.sh \
-       t/window-split-dir.sh \
-       t/last-node-not-top-level.sh \
-       t/adjust-anchors.sh \
-       t/recode-C-locale.sh \
-       t/xref-to-anchor.sh \
-       t/search-after-tag.sh \
-       t/split-file-menu.sh \
-       t/search-split-after-index.sh \
-       t/index.sh \
-       t/no-index.sh \
-       t/index-apropos.sh \
-       t/index-search.sh \
-       t/index-completing.sh \
-       t/split-index.sh \
-       t/index-long-nodeline.sh \
        t/index-paren.sh \
-       t/empty-infopath.sh \
-       t/menu-sequence.sh \
-       t/relative-reference.sh \
-       t/resize-in-completions.sh \
-       t/replace-viewed.sh \
-       t/search-skip-screen.sh \
-       t/search-empty.sh \
-       t/close-window-after-search.sh \
-       t/inc-sea-forward.sh \
-       t/inc-sea-forward-nonregex.sh \
-       t/inc-sea-insensitive.sh \
-       t/inc-sea-history.sh \
-       t/inc-sea-bs.sh \
-       t/gc-split.sh \
-       t/anchor-positions.sh \
-       t/quoted-label-as-target.sh \
-       t/quoted-target.sh \
-       t/quoted-label-and-target.sh \
-       t/quoted-manual-in-target.sh \
-       t/quoted-manual-in-label.sh \
-       t/goto-quoted.sh \
-       t/next-quoted.sh \
-       t/echo-area-no-completions.sh \
-       t/multiple-completions.sh \
        t/help.sh
 
-EXTRA_DIST += $(TESTS) $(XFAIL_TESTS) \
+TESTS = $(info_tests)
+
+if PTYS_TESTS
+check_PROGRAMS = pseudotty
+pseudotty_SOURCES = pseudotty.c
+
+TESTS += $(info_tests_with_pseudotty)
+else
+CLEANFILES += pseudotty
+endif
+
+EXTRA_DIST += $(info_tests) $(info_tests_with_pseudotty) $(XFAIL_TESTS) \
   t/README t/infodir \
   t/Init-test.inc \
   t/Infokey-config t/node-target
diff --git a/info/t/Init-test.inc b/info/t/Init-test.inc
index ce20f280a8..3e17144600 100644
--- a/info/t/Init-test.inc
+++ b/info/t/Init-test.inc
@@ -127,7 +127,9 @@ init_interactive_test ()
   test $initialization_done -eq 1 && return 0
   initialization_done=1
 
-  # Skip test if pseudotty wasn't built
+  # Skip test if pseudotty wasn't built.
+  # Note that this should not happen as tests requiring pseudotty
+  # are only run in the same situation where pseudotty is built.
   test -x pseudotty || exit 77
   
   # Avoid ginfo complaining that terminal is too dumb



reply via email to

[Prev in Thread] Current Thread [Next in Thread]