- Fix Go formatting, which was accidentally using clang-format.
- Update source_is_in_build_files to query the build system rather than
check build file contents.
- Remove pylint_errors_only check since full pylint is running.
- Add log_run wrapper that logs at debug then calls subprocess.run.
Change-Id: I1a335e2999b5aabcb2a39a2d8bc9fbe43d6dd75b
- Remove the path filter for init_virtualenv since the build depends on
Python.
- Add --clean-py option for cleaning only the Python venv.
- Rename --continue to --keep-going for consistency with Bazel.
- Make updates to Git path handling to correctly handle absolute versus
relative paths.
- Make the .presubmit directory relative to the root of the repo.
Change-Id: I9b2ce32dd4e1a9c993a10f37c252a685625c46ad
This change adds a pw_test_server module which implements a gRPC server
for queueing and distributing unit tests across multiple test runners.
The server is implemented as a Go library which can be imported and used
by developers to build a custom unit test running infrastructure.
To use the server, a UnitTestRunner interface that processes requests to
run unit tests must be implemented and registered with the server. An
implementation of this interface which runs unit test executables
through an external command is provided alongside the server.
An example program that uses the server library to run a unit test
server is also provided within the module. This program uses the
command-based test runners to run unit tests on a local machine. It is
configurable through a config file, allowing multiple workers to be
registered with the server. The program additionally doubles as a gRPC
client for the server which can be invoked with the path to a unit test
executable to schedule it to be run.
Change-Id: I347d230370620395de09e277f9763d7df1c4abad
- Check that all C, C++ sources appear in BUILD and BUILD.gn files.
- Check that all .rst files appear in BUILD.gn files.
- Make the pylint check fatal. The full presubmit will fail until some
issues are fixed. Incremental presubmits (e.g. with the pre-push hook
or pw presubmit --base master) will pass (unless there are errors).
Change-Id: Id42cc2e06278d0e56017a2008676db8e77ba6c20
- Switch many print statements to log statements.
- Only show command output when commands fail or debug logging is
enabled.
- Add a wrapper class for check functions to consolidate running
and logging logic for presubmit checks.
Change-Id: I72e155d602135b60c18f8973a778f40e65bb40da
- pw format (or pw_presubmit/format_code.py) supports checking and
fixing the format of Python, C/C++, GN, and Go code.
- Move code format presubmit checks into format_code.py.
- Accept paths not in a Git repository for pw format.
- Add an explicit check that pw presubmit is run from a Git repo.
Change-Id: I74bf54057bd5ace70a90271f7d1343711455792a
- Rename format_cc.py to format_code.py to make it language-agnostic.
- Exclude non-existing paths in the presubmit to handle deletions.
Change-Id: If07decfd9fe11539bd5ccc74243f00cbf33736b8
- The install_hook.py script installs a simple presubmit hook that wraps
another command.
- Add an --install option to Pigweed's presubmit that installs the
commit hook and exits.
Change-Id: I1b9296b103e0b94e1ff44cc5b274590f56f72831
- Organize pw_presubmit as a Python package.
- Move presubmit.py to into the package as pigweed_presubmit.py.
- Set up pigweed_presubmit.py to run whether the pw_presubmit package is
installed or not.
Change-Id: Id85937971d554332ab7d4adfd668eeafa6379976