This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients eric.snow, lemburg
Date 2021-10-27.15:42:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635349332.56.0.690000934648.issue45629@roundup.psfhosted.org>
In-reply-to
Content
I found that Tools/freeze doesn't get tested.  It has a "test" directory but it's more of a rudimentary sanity check that must be run manually.  Since the tool isn't tested through our test suite, there's a high likelihood it can get broken without anyone realizing it.  The risk has increased with recent changes to frozen modules.  So such tests would be valuable.

The tool requires that Python be installed.  In the context of our test suite, this means configuring with a temp dir prefix and then re-building.  We must do it in a separate directory to avoid affecting other tests.

I'm planning on adding a test that does the following:

1. create a temp dir (TMPDIR)
2. copy the repo to TMPDIR/cpython
3. run configure there with --prefix=TMPDIR/python-installation
4. run make -j
5. run make install -j
6. write a simple script to TMPDIR/app.py
7. run the "freeze" tool on it, with minimal options
8. run the frozen app and verify it worked

Note that there needs to be enough disk space for all that (which not all buildbots have).  Also, the test will be relatively slow due to having to re-build.

There aren't any other tests that re-build Python or the like, so I'm a little hesitant to set precedent.  Perhaps that's why there weren't any tests already.  However, I don't see any significant reasons to not add the test (as long as it doesn't lead to spurious failures).
History
Date User Action Args
2021-10-27 15:42:12eric.snowsetrecipients: + eric.snow, lemburg
2021-10-27 15:42:12eric.snowsetmessageid: <1635349332.56.0.690000934648.issue45629@roundup.psfhosted.org>
2021-10-27 15:42:12eric.snowlinkissue45629 messages
2021-10-27 15:42:12eric.snowcreate