|
611 | 611 | "-u", |
612 | 612 | "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", |
613 | 613 | "/usr/bin/adb.1.0.35", |
614 | | - "0", |
| 614 | + "4", |
615 | 615 | "userspace" |
616 | 616 | ], |
617 | 617 | "env": { |
618 | 618 | "CHROME_HEADLESS": "1", |
619 | 619 | "PATH": "<PATH>:RECIPE_REPO[depot_tools]" |
620 | 620 | }, |
621 | 621 | "infra_step": true, |
622 | | - "name": "Set CPU 0's governor to userspace", |
| 622 | + "name": "Set CPU 4's governor to userspace", |
623 | 623 | "timeout": 30, |
624 | 624 | "~followup_annotations": [ |
625 | 625 | "@@@STEP_LOG_LINE@python.inline@@@@", |
|
654 | 654 | "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\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\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", |
655 | 655 | "/usr/bin/adb.1.0.35", |
656 | 656 | "0.6", |
657 | | - "0" |
| 657 | + "4" |
658 | 658 | ], |
659 | 659 | "env": { |
660 | 660 | "CHROME_HEADLESS": "1", |
661 | 661 | "PATH": "<PATH>:RECIPE_REPO[depot_tools]" |
662 | 662 | }, |
663 | 663 | "infra_step": true, |
664 | | - "name": "Scale CPU 0 to 0.600000", |
| 664 | + "name": "Scale CPU 4 to 0.600000", |
665 | 665 | "timeout": 30, |
666 | 666 | "~followup_annotations": [ |
667 | 667 | "@@@STEP_LOG_LINE@python.inline@@@@", |
|
729 | 729 | "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\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\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", |
730 | 730 | "/usr/bin/adb.1.0.35", |
731 | 731 | "0.6", |
732 | | - "0" |
| 732 | + "4" |
733 | 733 | ], |
734 | 734 | "env": { |
735 | 735 | "CHROME_HEADLESS": "1", |
736 | 736 | "PATH": "<PATH>:RECIPE_REPO[depot_tools]" |
737 | 737 | }, |
738 | 738 | "infra_step": true, |
739 | | - "name": "Scale CPU 0 to 0.600000 (attempt 2)", |
| 739 | + "name": "Scale CPU 4 to 0.600000 (attempt 2)", |
740 | 740 | "timeout": 30, |
741 | 741 | "~followup_annotations": [ |
742 | 742 | "@@@STEP_LOG_LINE@python.inline@@@@", |
|
804 | 804 | "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ntarget_percent = float(sys.argv[2])\ncpu = int(sys.argv[3])\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nroot = '/sys/devices/system/cpu/cpu%d/cpufreq' %cpu\n\n# All devices we test on give a list of their available frequencies.\navailable_freqs = subprocess.check_output([ADB, 'shell',\n 'cat %s/scaling_available_frequencies' % root])\n\n# Check for message like '/system/bin/sh: file not found'\nif available_freqs and '/system/bin/sh' not in available_freqs:\n available_freqs = sorted(\n int(i) for i in available_freqs.strip().split())\nelse:\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\n# If scaling_max_freq is lower than our attempted setting, it won't take.\n# We must set min first, because if we try to set max to be less than min\n# (which sometimes happens after certain devices reboot) it returns a\n# perplexing permissions error.\nsubprocess.check_output([ADB, 'shell', 'echo 0 > '\n '%s/scaling_min_freq' % root])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_max_freq' % (freq, root)])\nsubprocess.check_output([ADB, 'shell', 'echo %d > '\n '%s/scaling_setspeed' % (freq, root)])\ntime.sleep(5)\nactual_freq = subprocess.check_output([ADB, 'shell', 'cat '\n '%s/scaling_cur_freq' % root]).strip()\nif actual_freq != str(freq):\n raise Exception('(actual, expected) (%s, %d)'\n % (actual_freq, freq))\n", |
805 | 805 | "/usr/bin/adb.1.0.35", |
806 | 806 | "0.6", |
807 | | - "0" |
| 807 | + "4" |
808 | 808 | ], |
809 | 809 | "env": { |
810 | 810 | "CHROME_HEADLESS": "1", |
811 | 811 | "PATH": "<PATH>:RECIPE_REPO[depot_tools]" |
812 | 812 | }, |
813 | 813 | "infra_step": true, |
814 | | - "name": "Scale CPU 0 to 0.600000 (attempt 3)", |
| 814 | + "name": "Scale CPU 4 to 0.600000 (attempt 3)", |
815 | 815 | "timeout": 30, |
816 | 816 | "~followup_annotations": [ |
817 | 817 | "@@@STEP_LOG_LINE@python.inline@@@@", |
|
935 | 935 | }, |
936 | 936 | { |
937 | 937 | "failure": { |
938 | | - "humanReason": "Infra Failure: Step('Scale CPU 0 to 0.600000 (attempt 3)') (retcode: 1)" |
| 938 | + "humanReason": "Infra Failure: Step('Scale CPU 4 to 0.600000 (attempt 3)') (retcode: 1)" |
939 | 939 | }, |
940 | 940 | "name": "$result" |
941 | 941 | } |
|
0 commit comments