10000 bpo-27640: Add --disable-test-modules configure option by pxinwr · Pull Request #23886 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-27640: Add --disable-test-modules configure option #23886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix no result issues when checking
  • Loading branch information
pxinwr committed Dec 24, 2020
commit 9a2fcad6153ff03575e3e681b1ad5bd7d6ba6974
13 changes: 8 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -17731,14 +17731,17 @@ fi
$as_echo_n "checking for --enable-test-modules... " >&6; }
# Check whether --enable-test-modules was given.
if test "${enable_test_modules+set}" = set; then :
enableval=$enable_test_modules; TEST_MODULES="${enableval}"
else
TEST_MODULES=yes
enableval=$enable_test_modules;
fi

if test "$enable_test_modules" = no; then
TEST_MODULES=no
else
TEST_MODULES=yes
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_test_modules" >&5
$as_echo "$enable_test_modules" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MODULES" >&5
$as_echo "$TEST_MODULES" >&6; }


# generate output files
Expand Down
10 changes: 7 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5836,10 +5836,14 @@ fi],
# check whether to disable test modules
AC_MSG_CHECKING(for --enable-test-modules)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the default is to enable tests, I would prefer an option to disable tests. https://bugs.python.org/issue27640 proposed to add --disable-test-suite to configure.

Can you please elaborate the effect of the option? I understand that if it's used, it disables the compilation of test extension modules, and prevent to install tests in "make install". Also elaborate it in the NEWS and What's New entries.

Copy link
Contributor Author
@pxinwr pxinwr Dec 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below copied from configure help. When we define an option enable-test-modules, the counterpart disable-test-modules will be also defined automatically. That is, disable-test-modules is already defined. The existing option --enable-ipv6 is an example that is default as yes.

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-universalsdk[=SDKDIR]
                          create a universal binary build. SDKDIR specifies
                          which macOS SDK should be used to perform the build,
                          see Mac/README.rst. (default is no)
  --enable-framework[=INSTALLDIR]
                          create a Python.framework rather than a traditional
                          Unix install. optional INSTALLDIR specifies the
                          installation path. see Mac/README.rst (default is
                          no)
  --enable-shared         enable building a shared Python library (default is
                          no)
  --enable-profiling      enable C-level code profiling with gprof (default is
                          no)
  --enable-optimizations  enable expensive, stable optimizations (PGO, etc.)
                          (default is no)
  --enable-loadable-sqlite-extensions
                          support loadable extensions in _sqlite module, see
                          Doc/library/sqlite3.rst (default is no)
  --enable-ipv6           enable ipv6 (with ipv4) support, see
                          Doc/library/socket.rst (default is yes if supported)
  --enable-big-digits[=15|30]
                          use big digits (30 or 15 bits) for Python longs
                          (default is system-dependent)]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"When we define an option enable-test-modules, the counterpart disable-test-modules will be also defined automatically."

Ah ok. But you should document that the change adds the --disable-test-modules option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot run "autoconf": configure it outdated, it contains the old documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Ah ok. But you should document that the change adds the --disable-test-modules option."
Done.
"You forgot run "autoconf": configure it outdated, it contains the old documentation."
Actually I did run it.

AC_ARG_ENABLE(test-modules,
AS_HELP_STRING([--enable-test-modules], [enable test modules (default is yes)]),
[ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
AS_HELP_STRING([--enable-test-modules], [enable test modules (default is yes)]))
if test "$enable_test_modules" = no; then
TEST_MODULES=no
else
TEST_MODULES=yes
fi
AC_SUBST(TEST_MODULES)
AC_MSG_RESULT($enable_test_modules)
AC_MSG_RESULT($TEST_MODULES)


# generate output files
Expand Down
0