Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Reporting coverage on task start up #3502

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/agent/onefuzz-task/src/tasks/coverage/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ impl CoverageTask {

context.heartbeat.alive();

info!("report initial coverage");
context.report_coverage_stats().await;

for dir in &self.config.readonly_inputs {
debug!("recording coverage for {}", dir.local_path.display());

Expand All @@ -161,7 +164,6 @@ impl CoverageTask {
}

if seen_inputs {
context.report_coverage_stats().await;
context.save_and_sync_coverage().await?;
}

Expand Down
4 changes: 2 additions & 2 deletions src/agent/onefuzz/src/syncdir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl SyncedDir {
Event::new_coverage => {
jr_client
.send_direct(
JobResultData::CoverageData,
JobResultData::NewCoverage,
HashMap::from([("count".to_string(), 1.0)]),
)
.await;
Expand Down Expand Up @@ -351,7 +351,7 @@ impl SyncedDir {
Event::new_coverage => {
jr_client
.send_direct(
JobResultData::CoverageData,
JobResultData::NewCoverage,
HashMap::from([("count".to_string(), 1.0)]),
)
.await;
Expand Down
Loading