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
Only print some of the run commands.
  • Loading branch information
ericsnowcurrently committed Oct 26, 2021
commit 172a259c794f7b95a436c79e43d9c9db04b6e9b7
14 changes: 9 additions & 5 deletions Tools/freeze/test/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ class UnsupportedError(Exception):
"""The operation isn't supported."""


def _run_cmd(cmd, cwd=None, verbose=True):
print(f'# {" ".join(shlex.quote(a) for a in cmd)}')
def _run_cmd(cmd, cwd=None, verbose=True, showcmd=True):
if showcmd:
print(f'# {" ".join(shlex.quote(a) for a in cmd)}')
proc = subprocess.run(
cmd,
cwd=cwd,
Expand Down Expand Up @@ -103,9 +104,11 @@ def get_config_var(build, name, *, fail=True):
if not os.path.isfile(python):
return get_makefile_var(builddir, 'CONFIG_ARGS', fail=fail)

text = _run_cmd([python, '-c',
'import sysconfig',
'sysconfig.get_config_var("CONFIG_ARGS")'])
text = _run_cmd(
[python, '-c',
'import sysconfig', 'sysconfig.get_config_var("CONFIG_ARGS")'],
showcmd=False,
)
return text


Expand All @@ -121,6 +124,7 @@ def get_prefix(build=None):
return _run_cmd(
[build, '-c' 'import sys; print(sys.prefix)'],
cwd=os.path.dirname(build),
showcmd=False,
)
else:
return get_makefile_var(build or '.', 'prefix', fail=False)
Expand Down