commit | 2c997f6b656a59a64d725370f07d30084084f870 | [log] [tgz] |
---|---|---|
author | Philipp Wollermann <philwo@google.com> | Fri Jun 14 02:17:33 2024 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jun 14 02:17:33 2024 |
tree | 5b5fcac87b32696603a9995ab4fad2a1a23d7703 | |
parent | 2dfef5994f05c319d473f8894eede557a9351985 [diff] |
siso: Fix "unknown target" error on Windows When specifying a `default` target that includes slashes in the build.ninja file, Siso would fail with an error about this being an unknown target. For example, editing Chromium's build.ninja file like this: ``` [...] default obj/v8/v8_turboshaft/typer.obj ``` results in this error: ``` PS C:\src\chromium\src> autoninja -C out\test [...] Error: failed to load build.ninja: build.ninja:51911 unknown target "obj\\v8\\v8_turboshaft\\typer.obj" ``` However, building the same target directly on the command line works: ``` PS C:\src\chromium\src> autoninja -C out\test ` obj/v8/v8_turboshaft/typer.obj ``` The reason is that `filepath.Clean` replaces slashes with backslashes on Windows, but Ninja targets must always use normal slashes, no matter the current platform. Change-Id: I9cf235c8354c67518d34f4be221dcd9632c5d3cb Reviewed-on: https://chromium-review.googlesource.com/c/infra/infra/+/5632814 Auto-Submit: Philipp Wollermann <philwo@google.com> Commit-Queue: Fumitoshi Ukai <ukai@google.com> Reviewed-by: Fumitoshi Ukai <ukai@google.com> Cr-Commit-Position: refs/heads/main@{#66220}
Welcome to the Chrome Infra repository!
Wondering where to start? Check out General Chrome Infrastructure documentation. In particular, to check out this repo and the rest of the infrastructure code, follow the instructions here. The rest of this page is specific to this repo.
sys.path
modifications.git push origin <updated hash>:deployed
git push
commandIf you've added a new module, run your tests with test.py:
*_test.py
files to this directory.Double-check that your tests are getting picked up when you want them to be: ./test.py test <path-to-package>
.
Tests still not getting picked up by test.py? Double-check to make sure you have __init__.py
files in each directory of your module so Python recognizes it as a package.
The preferred style is PEP8 with two-space indent; that is, the Chromium Python style, except functions use lowercase_with_underscores
. Use yapf (git cl format
) to autoformat new code.