Commit 1a3f167a by Ben Clayton

Regres: Add flag to run the daily test run on launch

Change-Id: I6247e0b5eef4639527ea15e7c5af115e5954a342 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33485 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 72d81048
......@@ -76,6 +76,7 @@ var (
keepCheckouts = flag.Bool("keep", false, "don't delete checkout directories after use")
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")
dailyNow = flag.Bool("dailynow", false, "Start by running the daily pass")
)
func main() {
......@@ -96,6 +97,7 @@ func main() {
gerritPass: os.ExpandEnv(*gerritPass),
keepCheckouts: *keepCheckouts,
dryRun: *dryRun,
dailyNow: *dailyNow,
}
if err := r.run(); err != nil {
......@@ -115,6 +117,7 @@ type regres struct {
keepCheckouts bool // don't delete source & build checkouts after testing
dryRun bool // don't post any reviews
maxProcMemory uint64 // max virtual memory for child processes
dailyNow bool // start with a daily run
}
// resolveDirs ensures that the necessary directories used can be found, and
......@@ -194,6 +197,10 @@ func (r *regres) run() error {
lastUpdatedTestLists := toDate(time.Now())
lastQueriedChanges := time.Time{}
if r.dailyNow {
lastUpdatedTestLists = date{}
}
for {
if now := time.Now(); toDate(now) != lastUpdatedTestLists && now.Hour() >= dailyUpdateTestListHour {
lastUpdatedTestLists = toDate(now)
......
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