[SERVER-79122] Support building the GDB pretty printer tests using ninja Created: 19/Jul/23 Updated: 29/Oct/23 Resolved: 06/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Trevor Guidry |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Development Platform
|
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
Only supporting building the pretty_printer_test_launcher*.py scripts using SCons is inconvenient for local development because Server engineers are primarily compiling using ninja and the icecream cluster. The changes from b334631 as part of Moreover, while the install-pretty-printer-tests ninja target will generate a build/opt/mongo/util/pretty_printer_test_launcher_pretty_printer_test.py file, it won't install the file into the build/install/ directory. The install-pretty-printer-tests ninja target won't even generate the build/opt/mongo/db/concurrency/pretty_printer_test_launcher_lock_gdb_test.py or build/opt/mongo/db/query/optimizer/pretty_printer_test_launcher_optimizer_gdb_test.py files and so it isn't possible to build all of the GDB pretty printers testing code without running SCons. We should make it simple for Server engineers to build and run the GDB pretty printer tests locally. |
| Comments |
| Comment by Githook User [ 06/Sep/23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Trevor Guidry', 'email': 'trevor.guidry@mongodb.com', 'username': ''}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alex Neben [ 22/Aug/23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I think this is a great path forward. Especially, while we are in the middle of the scons transition. Thank you for doing this. We will take your diff, test it, and merge it in. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Max Hirschhorn [ 21/Aug/23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I spent some time on my idea to create a new SCons target which builds only the non C++ targets. It works by removing test_program (== mongod) from the python program's dependency list when GDB_PPTEST_PYONLY=1 is specified.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Steve Gross [ 10/Aug/23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Per conversation w/ max.hirschhorn@mongodb.com : We agree that this problem warrants attention, and that the Bazel adoption is sufficiently far off in the calendar that we should find a way to address this sooner. However, we're staffing-constrained (that is, we have a variety of other projects on the docket), so it's difficult to figure out where this fits in. With that said, max.hirschhorn@mongodb.com agreed to investigate the issue and make a recommendation about how it might be solved. max.hirschhorn@mongodb.com , have I got that right? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Moody [ 19/Jul/23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ninja can not install the pretty printer test files correctly, so it does not. The problem is a chmod command, which the input and output are the same file, which ninja does not support. Also ninja can not support it because of the use of SCons substfile which our ninja tool does not support. In spite of these issues we could workaround it with enough effort. |