classification
Title: Test somehow that generated files are up to date: run make regen-all
Type: Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner, zach.ware
Priority: normal Keywords:

Created on 2017-05-03 16:26 by vstinner, last changed 2017-07-03 13:38 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2542 closed vstinner, 2017-07-03 13:33
PR 2543 closed vstinner, 2017-07-03 13:33
Messages (6)
msg292915 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 16:26
bpo-23404 replaced "make touch" with "make regen-all". Generated files are no more regenerated based on file modification time anymore, the action is now explicit.

Zachary Ware proposed to add a buildbot to check that generated files are up to date: run "make regen-all" and test that no file was modified.
msg292917 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 16:28
I also asked if something similar should be done for autoconf?
http://bugs.python.org/issue23404#msg292829
msg296866 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-26 09:55
Oh, Zachary: it seems like you already implemented this check, no?

"Use Travis to make sure all generated files are up to date"
[MERGED] https://github.com/python/cpython/pull/2080
msg296867 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-26 09:56
make -j4
      make -j4 regen-all clinic
      changes=`git status --porcelain`
      if ! test -z "$changes"
      then
        echo "Generated files not up to date"
        echo "$changes"
        exit 1
      fi

I understand that we build the whole Python, and only later check if generated files are up to date.

Why not checking if generated files are up to date *before* compiling Python?
msg297583 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-03 13:36
https://github.com/python/cpython/pull/2543 confirms that the "make regen-all" test works, the CI fails with:

Generated files not up to date

 M Include/Python-ast.h
msg297585 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-03 13:38
https://github.com/python/cpython/pull/2542 confirms that the "make clinic" test works, the CI fails with:

Generated files not up to date

 M Modules/clinic/posixmodule.c.h

 M Modules/posixmodule.c

--

I close the issue, thanks Zach for the automated tests!
History
Date User Action Args
2017-07-03 13:38:20vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg297585

stage: resolved
2017-07-03 13:36:15vstinnersetmessages: + msg297583
2017-07-03 13:33:32vstinnersetpull_requests: + pull_request2612
2017-07-03 13:33:27vstinnersetpull_requests: + pull_request2611
2017-06-26 09:56:48vstinnersetmessages: + msg296867
2017-06-26 09:55:20vstinnersetmessages: + msg296866
2017-05-03 16:28:28vstinnersetmessages: + msg292917
2017-05-03 16:26:48vstinnercreate