aboutsummaryrefslogtreecommitdiffstats
path: root/glob.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-02-01 13:21:35 -0800
committerColin Cross <ccross@android.com>2017-02-02 16:48:06 -0800
commitb519a7e1b69b6b658d8a0b7171323ffc03965ded (patch)
tree20db4d2e796137460ac4b815e49c05d171c9cac7 /glob.go
parent2eeb7ee14b6d8e1ec497cfa514cf22c1b4772c39 (diff)
downloadplatform_build_blueprint-b519a7e1b69b6b658d8a0b7171323ffc03965ded.tar.gz
platform_build_blueprint-b519a7e1b69b6b658d8a0b7171323ffc03965ded.tar.bz2
platform_build_blueprint-b519a7e1b69b6b658d8a0b7171323ffc03965ded.zip
Add globbing to filesystem mocking
Add globbing to filesystem mocking so that more code can be tested against the mock. Also moves the filesystem mock to pathtools, and renames pathtools.GlobWithExcludes to pathtools.Glob, replacing the existing pathtools.Glob. Test: blueprint tests Change-Id: I722df8121bc870c4a861d7c249245c57dcb607be
Diffstat (limited to 'glob.go')
-rw-r--r--glob.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/glob.go b/glob.go
index dad5edf..3497236 100644
--- a/glob.go
+++ b/glob.go
@@ -18,8 +18,6 @@ import (
"fmt"
"reflect"
"sort"
-
- "github.com/google/blueprint/pathtools"
)
type GlobPath struct {
@@ -54,7 +52,7 @@ func (c *Context) glob(pattern string, excludes []string) ([]string, error) {
}
// Get a globbed file list
- files, deps, err := pathtools.GlobWithExcludes(pattern, excludes)
+ files, deps, err := c.fs.Glob(pattern, excludes)
if err != nil {
return nil, err
}