Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a2e4494
Ignore the tests outdir.
ericsnowcurrently Oct 26, 2021
9675b69
Add test helpers for the "freeze" tool.
ericsnowcurrently Oct 26, 2021
a34dca4
Add a test for the "freeze" tool.
ericsnowcurrently Oct 26, 2021
77f334d
Create the outdir.
ericsnowcurrently Oct 26, 2021
561f8e1
Build in the source tree for tests.
ericsnowcurrently Oct 26, 2021
bd54ddd
Copy the repo during tests.
ericsnowcurrently Oct 26, 2021
5d0ec9e
Force the git pull.
ericsnowcurrently Oct 26, 2021
b879a3c
Show the commands.
ericsnowcurrently Oct 26, 2021
5639939
Fix the relfile.
ericsnowcurrently Oct 26, 2021
172a259
Only print some of the run commands.
ericsnowcurrently Oct 26, 2021
875cbe3
Actually print the config var.
ericsnowcurrently Oct 26, 2021
8e4e52e
Fix a kwarg.
ericsnowcurrently Oct 26, 2021
bf95b31
Fall back to Makefile if sysconfig fails.
ericsnowcurrently Oct 26, 2021
a8e2cf0
Do not clean up first if there is not Makefile.
ericsnowcurrently Oct 26, 2021
fab3dad
Clean up get_config_var().
ericsnowcurrently Oct 26, 2021
ef579ac
Do not duplicate configure args.
ericsnowcurrently Oct 26, 2021
7338d60
Clean up the copied repo first.
ericsnowcurrently Oct 26, 2021
f6a8755
Hide error text in get_config_var().
ericsnowcurrently Oct 26, 2021
b12477e
Skip the freeze tests if the tool is missing.
ericsnowcurrently Oct 26, 2021
2dd674d
Be explicit about the -j option.
ericsnowcurrently Oct 26, 2021
cc68b86
Do not use the -C option with git.
ericsnowcurrently Oct 26, 2021
9b6aee8
Simplify.
ericsnowcurrently Oct 26, 2021
4b315b0
Skip the test if running with "-u -cpu".
ericsnowcurrently Oct 27, 2021
aa56cfc
Do not run the test on buildbots.
ericsnowcurrently Oct 27, 2021
4c18103
Add test.support.skip_if_buildbot().
ericsnowcurrently Oct 27, 2021
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
Fall back to Makefile if sysconfig fails.
  • Loading branch information
ericsnowcurrently committed Oct 26, 2021
commit bf95b315df94c280983e2ddfa30f80ec11dfe583
16 changes: 10 additions & 6 deletions Tools/freeze/test/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,22 @@ def get_makefile_var(builddir, name, *, fail=True):
def get_config_var(build, name, *, fail=True):
if os.path.isfile(build):
python = build
builddir = os.path.dirname(build)
else:
builddir = build
python = os.path.join(builddir, 'python')
if not os.path.isfile(python):
return get_makefile_var(builddir, 'CONFIG_ARGS', fail=fail)

text = _run_cmd(
[python, '-c',
'import sysconfig', 'print(sysconfig.get_config_var("CONFIG_ARGS"))'],
showcmd=False,
)
return text
try:
text = _run_cmd(
[python, '-c',
'import sysconfig', 'print(sysconfig.get_config_var("CONFIG_ARGS"))'],
showcmd=False,
)
return text
except subprocess.CalledProcessError:
return get_makefile_var(builddir, 'CONFIG_ARGS', fail=fail)


def get_configure_args(build, *, fail=True):
Expand Down