[roll pigweed] pw_build: Shorten script path in generated_modules_lists

This updates the script path written to the generated modules file to
only show the parent directory and script file (i.e.
pw_build/generate_modules_lists.py).

This ensures that the generated output is the same when invoked by
Ninja or from another Python module. Otherwise, the import case results
in a script path starting in .environment/ causing the module list diff
to fail.

Additionally, this fixes a bug where the module list diff was not being
printed due to the generator being consumed.

Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/107190

https://pigweed.googlesource.com/pigweed/pigweed
pigweed Rolled-Commits: cad987cd6edf7fc..52db0c3e7eca3e6
Roller-URL: https://ci.chromium.org/b/8805550460798952321
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ie1155eabf5a00d907afa24ecb7a092c1cd9b4c39
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/zephyr-integration/+/106840
Commit-Queue: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>
Bot-Commit: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>
1 file changed
tree: 73684b406e870b14122e662ac5327283acb8484e
  1. .gitmodules
  2. test.sh