aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json6
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json6
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json6
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json6
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json12
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json6
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json6
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json6
-rw-r--r--infra/bots/recipe_modules/flavor/gn_android_flavor.py4
-rw-r--r--infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json6
-rw-r--r--infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json6
-rw-r--r--infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json6
-rw-r--r--infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json6
-rw-r--r--infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json6
-rw-r--r--infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json6
-rw-r--r--infra/bots/recipes/perf.expected/cpu_scale_failed.json18
-rw-r--r--infra/bots/recipes/perf.expected/cpu_scale_failed_once.json12
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-All-Android.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json6
-rw-r--r--infra/bots/recipes/test.expected/failed_get_hashes.json6
-rw-r--r--infra/bots/recipes/test.expected/failed_pull.json6
28 files changed, 95 insertions, 95 deletions
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json
index 222ce095e6..90857f5b61 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-All-Android.json
@@ -642,7 +642,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -708,8 +708,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json
index 65014975ef..9b68f95e27 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json
@@ -642,7 +642,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Pixel",
"0.6"
@@ -708,8 +708,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
index 944ac1e945..e441f82618 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
@@ -642,7 +642,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus10",
"1.0"
@@ -708,8 +708,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json
index 3dfbe3d1b7..a02fe9f1cc 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-All-Android.json
@@ -642,7 +642,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Pixel",
"1.0"
@@ -708,8 +708,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json
index 64653e78ec..5d9e97517e 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/cpu_scale_failed.json
@@ -642,7 +642,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -709,8 +709,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
@@ -727,7 +727,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -793,8 +793,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json
index 7387dc1ffb..76000150b1 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_infra_step.json
@@ -642,7 +642,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -708,8 +708,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json
index 77593f3082..d366882cbf 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/failed_read_version.json
@@ -696,7 +696,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -762,8 +762,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json
index 2278f50725..e2b81e6668 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/retry_adb_command.json
@@ -696,7 +696,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -762,8 +762,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
index a68d112cf4..b512a2c61d 100644
--- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
@@ -128,8 +128,8 @@ subprocess.check_output([ADB, 'shell', 'echo "userspace" > '
# If scaling_max_freq is lower than our attempted setting, it won't take.
subprocess.check_output([ADB, 'shell', 'echo %d > '
'/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])
-subprocess.check_output([ADB, 'shell', 'echo %d > '
- '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])
+subprocess.check_output([ADB, 'shell', 'echo 0 > '
+ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])
subprocess.check_output([ADB, 'shell', 'echo %d > '
'/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])
time.sleep(5)
diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
index 730e4c6023..21c714ab52 100644
--- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
+++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
@@ -576,7 +576,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus10",
"0.6"
@@ -642,8 +642,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json
index 7a56ab9864..95d87c45c3 100644
--- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json
+++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android.json
@@ -540,7 +540,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus5",
"0.6"
@@ -606,8 +606,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json
index 2d41ceedfa..a4497e098c 100644
--- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json
+++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android.json
@@ -576,7 +576,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus7",
"0.6"
@@ -642,8 +642,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json
index 1d40e3030f..56dc7cfa39 100644
--- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json
+++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android.json
@@ -576,7 +576,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -642,8 +642,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json
index bdfd09a580..0ed8677b66 100644
--- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json
+++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json
@@ -576,7 +576,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -642,8 +642,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json b/infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json
index 54eb56edbc..fd2ab5ff59 100644
--- a/infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json
+++ b/infra/bots/recipes/perf.expected/Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench.json
@@ -576,7 +576,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"PixelC",
"0.6"
@@ -642,8 +642,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/perf.expected/cpu_scale_failed.json b/infra/bots/recipes/perf.expected/cpu_scale_failed.json
index fda135086b..8d863f8c8c 100644
--- a/infra/bots/recipes/perf.expected/cpu_scale_failed.json
+++ b/infra/bots/recipes/perf.expected/cpu_scale_failed.json
@@ -540,7 +540,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -607,8 +607,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
@@ -625,7 +625,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -692,8 +692,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
@@ -710,7 +710,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -777,8 +777,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/perf.expected/cpu_scale_failed_once.json b/infra/bots/recipes/perf.expected/cpu_scale_failed_once.json
index 65662ffefb..fd72d1f449 100644
--- a/infra/bots/recipes/perf.expected/cpu_scale_failed_once.json
+++ b/infra/bots/recipes/perf.expected/cpu_scale_failed_once.json
@@ -540,7 +540,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -607,8 +607,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
@@ -625,7 +625,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"0.6"
@@ -691,8 +691,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json
index 2df35b8962..453fcd8b44 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"AndroidOne",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
index 3d0aa94721..676b5da437 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus10",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json
index 9cfe16a0d6..1947ccfd8b 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus5",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android.json
index 11dcd89498..2ed15d76ff 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus7",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json
index 74dc50e4f5..0330169e5e 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json
index 16216543ce..3aefe1fd69 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"NexusPlayer",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-All-Android.json b/infra/bots/recipes/test.expected/Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-All-Android.json
index df0591e56f..2aeed3bdb6 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-All-Android.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-All-Android.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"PixelC",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json b/infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json
index dac5dde1fd..7fc842c42f 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_CCPR.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"PixelXL",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json b/infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json
index 200312762c..cea6f20ced 100644
--- a/infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json
+++ b/infra/bots/recipes/test.expected/Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_Vulkan.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"PixelXL",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/failed_get_hashes.json b/infra/bots/recipes/test.expected/failed_get_hashes.json
index 7ed60700b6..3f1df6c20f 100644
--- a/infra/bots/recipes/test.expected/failed_get_hashes.json
+++ b/infra/bots/recipes/test.expected/failed_get_hashes.json
@@ -659,7 +659,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus7",
"1.0"
@@ -725,8 +725,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",
diff --git a/infra/bots/recipes/test.expected/failed_pull.json b/infra/bots/recipes/test.expected/failed_pull.json
index a3f994b1b3..111d5f041e 100644
--- a/infra/bots/recipes/test.expected/failed_pull.json
+++ b/infra/bots/recipes/test.expected/failed_pull.json
@@ -657,7 +657,7 @@
"cmd": [
"python",
"-u",
- "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
+ "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\nmodel = sys.argv[2]\ntarget_percent = float(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nif model == 'Nexus10':\n # Nexus10 doesn't list available frequencies, but it does give a\n # min and a max and seems to round to the nearest 100khz, so a\n # subset of those available are here.\n available_freqs = [200000, 400000, 600000, 800000, 1000000, 1200000,\n 1400000, 1700000]\nelif model == 'Nexus7':\n # Nexus7 claims to support 1300000, but only really allows 1200000\n available_freqs = [51000, 102000, 204000, 340000, 475000, 640000, 760000,\n 860000, 1000000, 1100000, 1200000]\nelse:\n # Most devices give a list of their available frequencies.\n available_freqs = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'])\n\n # Check for message like '/system/bin/sh: file not found'\n if available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\n else:\n raise Exception('Could not get list of available frequencies: %s' %\n available_freqs)\n\nmaxfreq = available_freqs[-1]\ntarget = int(round(maxfreq * target_percent))\nfreq = maxfreq\nfor f in reversed(available_freqs):\n if f <= target:\n freq = f\n break\n\nprint 'Setting frequency to %d' % freq\n\nsubprocess.check_output([ADB, 'shell', 'echo \"userspace\" > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'])\n# If scaling_max_freq is lower than our attempted setting, it won't take.\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq']).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n",
"adb.1.0.35",
"Nexus7",
"1.0"
@@ -723,8 +723,8 @@
"@@@STEP_LOG_LINE@python.inline@# If scaling_max_freq is lower than our attempted setting, it won't take.@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq' % freq])@@@",
- "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
- "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq' % freq])@@@",
+ "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo 0 > '@@@",
+ "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq'])@@@",
"@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo %d > '@@@",
"@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed' % freq])@@@",
"@@@STEP_LOG_LINE@python.inline@time.sleep(5)@@@",