siso: add tests for filegroup glob matching and starlark parsing

Previously, filegroup tests only covered basic filename-only patterns,
leaving key functionality untested:
- The code path for patterns containing '/' (which matches against the
  full relative path using path.Match instead of just path.Base) was
  never tested for both includes and excludes.
- Handling of absolute root directories (for CrOS chroot), invalid
  paths outside the workspace, and non-existent directories lacked
  test coverage.
- Starlark configuration parsing and Config.UpdateFilegroups in
  star_filegroups.go had 0% test coverage.

This CL adds comprehensive test cases to address these gaps:
- Test pattern matching with slash in includes (e.g. "debug/*.h") and
  excludes (e.g. "debug/*").
- Test absolute directory prefixing, invalid workspace paths, and zero-
  match cases in TestFilegroupGlob.
- Add TestParseFilegroups to verify parsing of implicit/explicit 'dir',
  'includes', 'excludes', and invalid configuration errors.
- Add TestUpdateFilegroups to verify concurrent updates and handling of
  missing directories (fs.ErrNotExist).

Change-Id: I54d8237903c60645ed196a4ec9b1123deb478892
Reviewed-on: https://chromium-review.googlesource.com/c/build/+/8257189
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
2 files changed
tree: 729759f198ab23c4881ba6942fa72bc25b8417cb
  1. bench/
  2. gong/
  3. hashigo/
  4. infra/
  5. kajiya/
  6. kzipinfo/
  7. remote-apis/
  8. runmc/
  9. siso/
  10. .gitignore
  11. .golangci.yml
  12. .style.yapf
  13. BUILD_OWNERS
  14. BUILD_TEAM_OWNERS
  15. CONTRIBUTING.md
  16. LICENSE
  17. OWNERS
  18. PRESUBMIT.py
  19. README.md
  20. WATCHLISTS
README.md

build.git repository

This repository contains tools developed and owned by the Chrome Build Team.

Quick start

The steps for getting the code are:

  1. Install depot_tools
  2. Run git clone https://chromium.googlesource.com/build

We use the standard Go module workflow to work on our projects.

Links