Commit 8c126fa1 by Ben Clayton

Regres: Add flag to prioritize a single change

Change-Id: Ieaec8e9dd2017803d862ce8bcdc6b00582b7d45b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33486 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 1a3f167a
...@@ -77,6 +77,7 @@ var ( ...@@ -77,6 +77,7 @@ var (
dryRun = flag.Bool("dry", false, "don't post regres reports to gerrit") dryRun = flag.Bool("dry", false, "don't post regres reports to gerrit")
maxProcMemory = flag.Uint64("max-proc-mem", shell.MaxProcMemory, "maximum virtual memory per child process") maxProcMemory = flag.Uint64("max-proc-mem", shell.MaxProcMemory, "maximum virtual memory per child process")
dailyNow = flag.Bool("dailynow", false, "Start by running the daily pass") dailyNow = flag.Bool("dailynow", false, "Start by running the daily pass")
priority = flag.String("priority", "", "Prioritize a single change with the given id")
) )
func main() { func main() {
...@@ -98,6 +99,7 @@ func main() { ...@@ -98,6 +99,7 @@ func main() {
keepCheckouts: *keepCheckouts, keepCheckouts: *keepCheckouts,
dryRun: *dryRun, dryRun: *dryRun,
dailyNow: *dailyNow, dailyNow: *dailyNow,
priority: *priority,
} }
if err := r.run(); err != nil { if err := r.run(); err != nil {
...@@ -118,6 +120,7 @@ type regres struct { ...@@ -118,6 +120,7 @@ type regres struct {
dryRun bool // don't post any reviews dryRun bool // don't post any reviews
maxProcMemory uint64 // max virtual memory for child processes maxProcMemory uint64 // max virtual memory for child processes
dailyNow bool // start with a daily run dailyNow bool // start with a daily run
priority string // Prioritize a single change with the given id
} }
// resolveDirs ensures that the necessary directories used can be found, and // resolveDirs ensures that the necessary directories used can be found, and
...@@ -228,6 +231,13 @@ func (r *regres) run() error { ...@@ -228,6 +231,13 @@ func (r *regres) run() error {
} }
} }
for _, c := range changes {
if c.pending && r.priority == c.id {
log.Printf("Prioritizing change '%s'\n", c.id)
c.priority = 1e6
}
}
// Find the change with the highest priority. // Find the change with the highest priority.
var change *changeInfo var change *changeInfo
numPending := 0 numPending := 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment