Index: scripts/slave/recipe_modules/goma/example.expected/linux.json |
diff --git a/scripts/slave/recipe_modules/goma/example.expected/linux.json b/scripts/slave/recipe_modules/goma/example.expected/linux.json |
index 1523b2e54287b04c1f5bb4a9f8449689101543b7..44fb9e0e2e94c6fb45347f4dfe30f0773f061390 100644 |
--- a/scripts/slave/recipe_modules/goma/example.expected/linux.json |
+++ b/scripts/slave/recipe_modules/goma/example.expected/linux.json |
@@ -88,6 +88,47 @@ |
"cmd": [ |
"python", |
"-u", |
+ "\nimport multiprocessing\nimport sys\n\njob_limit = 200\nif sys.platform.startswith('linux'):\n # Use 80 for linux not to load goma backend.\n job_limit = 80\n\ntry:\n jobs = min(job_limit, multiprocessing.cpu_count() * 10)\nexcept NotImplementedError:\n jobs = 50\n\nprint jobs\n" |
+ ], |
+ "name": "calculate the number of recommended jobs", |
+ "stdout": "/path/to/tmp/", |
+ "~followup_annotations": [ |
+ "@@@STEP_LOG_LINE@python.inline@@@@", |
+ "@@@STEP_LOG_LINE@python.inline@import multiprocessing@@@", |
+ "@@@STEP_LOG_LINE@python.inline@import sys@@@", |
+ "@@@STEP_LOG_LINE@python.inline@@@@", |
+ "@@@STEP_LOG_LINE@python.inline@job_limit = 200@@@", |
+ "@@@STEP_LOG_LINE@python.inline@if sys.platform.startswith('linux'):@@@", |
+ "@@@STEP_LOG_LINE@python.inline@ # Use 80 for linux not to load goma backend.@@@", |
+ "@@@STEP_LOG_LINE@python.inline@ job_limit = 80@@@", |
+ "@@@STEP_LOG_LINE@python.inline@@@@", |
+ "@@@STEP_LOG_LINE@python.inline@try:@@@", |
+ "@@@STEP_LOG_LINE@python.inline@ jobs = min(job_limit, multiprocessing.cpu_count() * 10)@@@", |
+ "@@@STEP_LOG_LINE@python.inline@except NotImplementedError:@@@", |
+ "@@@STEP_LOG_LINE@python.inline@ jobs = 50@@@", |
+ "@@@STEP_LOG_LINE@python.inline@@@@", |
+ "@@@STEP_LOG_LINE@python.inline@print jobs@@@", |
+ "@@@STEP_LOG_END@python.inline@@@" |
+ ] |
+ }, |
+ { |
+ "cmd": [ |
+ "echo", |
+ "50" |
+ ], |
+ "name": "echo goma jobs" |
+ }, |
+ { |
+ "cmd": [ |
+ "echo", |
+ "50" |
+ ], |
+ "name": "echo goma jobs second" |
+ }, |
+ { |
+ "cmd": [ |
+ "python", |
+ "-u", |
"[CACHE]/cipd/goma/goma_ctl.py", |
"jsonstatus", |
"[CACHE]/cipd/goma/jsonstatus" |