Skip to content

Conversation

@pda
Copy link
Member

@pda pda commented Mar 19, 2025

Draft, based on #278 which is based on #277

Listen to Build Event Protocol (BEP) / Build Event Service (BES) and upload the XML test result files to Test Engine.

Related:

pda added 4 commits March 20, 2025 15:37
PublishBuildToolEventStream is copied verbatim from bb-portal,
and BuildEventHandler and BuildEventChannel interfaces/structs are
created to be compatible with that code.

This also resolves a bug in the earlier WIP implementation where most
event sequence IDs were not acknowledged, resulting in a warning shown
on the Bazel side sending the events.
*.dll
*.so
*.dylib
/bktec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

logErrorAndExit(16, "upload: %v", err)
}
os.Exit(0)
} else if flag.Arg(0) == "bazel" && flag.Arg(1) == "listen" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] I reckon switch will be more readable now we are most likely going to have many sub-commands.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would that be a nested switch?

switch flag.Arg(0) {
case "upload":
  …
case "bazel":
  switch {
  case "listen":
    …
  default:
    …
  }
default:
  …
}

I figured it's simpler to use a flatter if for the moment, and think about whether we want to adopt a bells-and-whistles subcommand/flags package or use some nested switch etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants