Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1540)

Unified Diff: dm/DM.cpp

Issue 998263003: DM: add keepalive for Valgrind bot. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 9f3dbaba5eda2ca9489a26683622c5d141e8ff18..9739210bc2e4eb3584a4f08ede0e3506a6130230 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -14,6 +14,7 @@
#include "SkOSFile.h"
#include "SkTHash.h"
#include "SkTaskGroup.h"
+#include "SkThreadUtils.h"
#include "Test.h"
#include "Timer.h"
@@ -515,6 +516,20 @@ static void run_enclave_and_gpu_tests(SkTArray<Task>* tasks) {
}
}
+// Some runs (mostly, Valgrind) are so slow that the bot framework thinks we've hung.
+// This prints something every once in a while so that it knows we're still working.
+static void keep_alive(void*) {
+ for (;;) {
+ static const int kSec = 300;
+#if defined(SK_BUILD_FOR_WIN)
+ Sleep(kSec * 1000);
+#else
+ sleep(kSec);
+#endif
+ SkDebugf("\nStill alive: doing science, reticulating splines...\n");
+ }
+}
+
int dm_main();
int dm_main() {
SetupCrashHandler();
@@ -524,6 +539,9 @@ int dm_main() {
SkInstCountPrintLeaksOnExit();
}
+ SkThread keepAlive(keep_alive); // This thread will just be killed by processes shutdown.
+ keepAlive.start();
+
gather_gold();
gather_srcs();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698