diff options
author | Colin Cross <ccross@android.com> | 2017-05-09 13:34:34 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-05-09 14:32:45 -0700 |
commit | 5b52959c996c929896d144b5be09ee5ff7e6a7af (patch) | |
tree | 858b6df02bcf7462b2e12e6a8f4dc44048a8af28 /android/paths.go | |
parent | 51d4ab2d5e55b02d2a66420074d9317c47f1beee (diff) | |
download | build_soong-5b52959c996c929896d144b5be09ee5ff7e6a7af.tar.gz build_soong-5b52959c996c929896d144b5be09ee5ff7e6a7af.tar.bz2 build_soong-5b52959c996c929896d144b5be09ee5ff7e6a7af.zip |
Use ctx.ModuleBuild for darwin ar
Test: builds
Change-Id: If90975c8545158012bc6201acadd136363c21260
Diffstat (limited to 'android/paths.go')
-rw-r--r-- | android/paths.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/android/paths.go b/android/paths.go index 75e5980e..0d26dc02 100644 --- a/android/paths.go +++ b/android/paths.go @@ -721,3 +721,25 @@ func validatePath(ctx PathContext, paths ...string) string { } return validateSafePath(ctx, paths...) } + +type testPath struct { + basePath +} + +func (p testPath) String() string { + return p.path +} + +func PathForTesting(paths ...string) Path { + p := validateSafePath(nil, paths...) + return testPath{basePath{path: p, rel: p}} +} + +func PathsForTesting(strs []string) Paths { + p := make(Paths, len(strs)) + for i, s := range strs { + p[i] = PathForTesting(s) + } + + return p +} |