This repository was archived by the owner on Nov 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-28
lines changed
src/agent/onefuzz-task/src/local Expand file tree Collapse file tree 3 files changed +14
-28
lines changed Original file line number Diff line number Diff line change 77# * ./etc/scaleset_name -> Where I wrote the value `local` / ----- These 2 allow us to omit setting ONEFUZZ_ROOT env var
88# * ./inputs/
99# * ./crashes/
10+ # * ./coverage/
1011# Ideally (in my opinion), this folder/file setup should be automated but remain configurable if desired
1112# 3. Install llvm and export LLVM_SYMBOLIZER_PATH like we do in setup.sh
1213
@@ -35,10 +36,10 @@ tasks:
3536 # minimized_stack_depth: ""
3637 # check_queue: ""
3738
38- # - type: "Coverage"
39- # <<: *target_args
40- # input_queue :
41- # path: "./coverage "
42- # readonly_inputs: []
43- # module_allowlist: ""
44- # source_allowlist : ""
39+ - type : " Coverage"
40+ << : *target_args
41+ target_options :
42+ - " {input} "
43+ input_queue : " ./inputs "
44+ readonly_inputs : []
45+ coverage : " ./coverage "
Original file line number Diff line number Diff line change 106106 }
107107 },
108108 "FolderWatch" : {
109- "type" : " object" ,
110- "required" : [
111- " path"
112- ],
113- "properties" : {
114- "path" : {
115- "description" : " The path to watch" ,
116- "type" : " string"
117- }
118- }
109+ "type" : " string"
119110 },
120111 "TaskConfig" : {
121112 "oneOf" : [
286277 ],
287278 "properties" : {
288279 "coverage" : {
289- "type" : " string" ,
290- "default" : " ./onefuzz_coverage.json"
280+ "type" : " string"
291281 },
292282 "input_queue" : {
293283 "anyOf" : [
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ struct Coverage {
131131 target_timeout : Option < u64 > ,
132132 module_allowlist : Option < String > ,
133133 source_allowlist : Option < String > ,
134- input_queue : Option < FolderWatch > ,
134+ input_queue : FolderWatch ,
135135 readonly_inputs : Vec < PathBuf > ,
136136 coverage : PathBuf ,
137137}
@@ -194,22 +194,17 @@ impl TaskConfig {
194194 } )
195195 . collect ( ) ;
196196
197- let input_q_fut: OptionFuture < _ > = config
198- . input_queue
199- . iter ( )
200- . map ( |w| context. monitor_dir ( w) )
201- . next ( )
202- . into ( ) ;
197+ let input_q_fut = context. monitor_dir ( & config. input_queue ) ;
203198
204- let input_q = input_q_fut. await . transpose ( ) ?;
199+ let input_q = input_q_fut. await ?;
205200
206201 let coverage_config = crate :: tasks:: coverage:: generic:: Config {
207202 target_exe : config. target_exe . clone ( ) ,
208203 target_env : config. target_env . clone ( ) ,
209204 target_options : config. target_options . clone ( ) ,
210205 target_timeout : None ,
211206 readonly_inputs : ri?,
212- input_queue : input_q,
207+ input_queue : Some ( input_q) ,
213208 common : CommonConfig {
214209 task_id : uuid:: Uuid :: new_v4 ( ) ,
215210 ..context. common . clone ( )
You can’t perform that action at this time.
0 commit comments