summaryrefslogtreecommitdiff
path: root/rust/androidmk.go
diff options
context:
space:
mode:
author hamzeh <hamzeh@google.com> 2021-07-07 14:00:07 -0700
committer hamzeh <hamzeh@google.com> 2021-07-16 17:43:33 -0700
commit41ad881e162a3c1fe057e9e301da0b123de1557f (patch)
treeca919157b4a97be03caa5c16445b250438d9a4ff /rust/androidmk.go
parent393bffee78a8c825d6bc64bf096b6df6978f7150 (diff)
Refactoring fuzz packaging code
Rust and cc fuzz packaging have common. This change is to put this common methods and fields into fuzz_common. Test: make haiku and make haiku-rust ran locally and verify corpus, dict and config are packaged along with the executable. Change-Id: I04bf535cd2597ed8b2bd3d8e6ea8c28f38bdc18b
Diffstat (limited to 'rust/androidmk.go')
-rw-r--r--rust/androidmk.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/rust/androidmk.go b/rust/androidmk.go
index ea45ebd01..630805a85 100644
--- a/rust/androidmk.go
+++ b/rust/androidmk.go
@@ -205,24 +205,24 @@ func (fuzz *fuzzDecorator) AndroidMkEntries(ctx AndroidMkContext, entries *andro
ctx.SubAndroidMk(entries, fuzz.binaryDecorator)
var fuzzFiles []string
- for _, d := range fuzz.corpus {
+ for _, d := range fuzz.fuzzPackagedModule.Corpus {
fuzzFiles = append(fuzzFiles,
- filepath.Dir(fuzz.corpusIntermediateDir.String())+":corpus/"+d.Base())
+ filepath.Dir(fuzz.fuzzPackagedModule.CorpusIntermediateDir.String())+":corpus/"+d.Base())
}
- for _, d := range fuzz.data {
+ for _, d := range fuzz.fuzzPackagedModule.Data {
fuzzFiles = append(fuzzFiles,
- filepath.Dir(fuzz.dataIntermediateDir.String())+":data/"+d.Rel())
+ filepath.Dir(fuzz.fuzzPackagedModule.DataIntermediateDir.String())+":data/"+d.Rel())
}
- if fuzz.dictionary != nil {
+ if fuzz.fuzzPackagedModule.Dictionary != nil {
fuzzFiles = append(fuzzFiles,
- filepath.Dir(fuzz.dictionary.String())+":"+fuzz.dictionary.Base())
+ filepath.Dir(fuzz.fuzzPackagedModule.Dictionary.String())+":"+fuzz.fuzzPackagedModule.Dictionary.Base())
}
- if fuzz.config != nil {
+ if fuzz.fuzzPackagedModule.Config != nil {
fuzzFiles = append(fuzzFiles,
- filepath.Dir(fuzz.config.String())+":config.json")
+ filepath.Dir(fuzz.fuzzPackagedModule.Config.String())+":config.json")
}
entries.ExtraEntries = append(entries.ExtraEntries, func(ctx android.AndroidMkExtraEntriesContext,