From 976280372e67b5d7125cae4a764cb0028fd04c7e Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 30 Jan 2018 17:07:07 +0000 Subject: [PATCH 1/6] tests: Fix some docstring and messages Update some messages to match what the code does. --- tests/eas/generic.py | 4 ++-- tests/eas/load_tracking.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/eas/generic.py b/tests/eas/generic.py index 252b79162..07e107ca1 100644 --- a/tests/eas/generic.py +++ b/tests/eas/generic.py @@ -355,7 +355,7 @@ class _EnergyModelTest(LisaTest): Use :meth:get_expected_power_df and :meth:get_power_df to estimate optimal and observed power usage for task placements of the experiment's workload. Assert that the observed power does not exceed the optimal - power by more than 20%. + power by more than :attr:energy_est_threshold_pct percents. """ exp_power = self.get_expected_power_df(experiment) est_power = self.get_power_df(experiment) @@ -496,7 +496,7 @@ class TwoBigThreeSmall(_EnergyModelTest): class RampUp(_EnergyModelTest): """ - Test EAS for a task ramping from 5% up to 70% over 2 seconds + Test EAS for a task ramping from 5% up to 70% """ workloads = { "ramp_up" : { diff --git a/tests/eas/load_tracking.py b/tests/eas/load_tracking.py index 96f5b0d95..379aada1d 100644 --- a/tests/eas/load_tracking.py +++ b/tests/eas/load_tracking.py @@ -164,7 +164,7 @@ class _LoadTrackingBase(LisaTest): elif 'sched_pelt_se' in trace.available_events: event = 'sched_pelt_se' else: - raise ValueError('No sched_load_avg_task or sched_pelt_se events. ' + raise ValueError('No sched_load_avg_task or sched_load_se or sched_pelt_se events. ' 'Does the kernel support them?') df = getattr(trace.ftrace, event).data_frame -- GitLab From 59af93905c9e9c0ed0416881eef5cca6e0392855 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 30 Jan 2018 17:21:28 +0000 Subject: [PATCH 2/6] test env: Make test invocation more flexible Allow specifying: * Target config file through LISA_TARGET_CONF env var or lisa-test --target-conf target.config * Results directory using LISA_RESULTS_DIR env var or lisa-test --results-dir /path/to/results/ When the results directory is specified, an xUnit file results.xml will be created by nosetests in this folder. Also fix parameter forwarding to nosetests command and simplify handling of --iterations. Update LISA help message to warn about testing more than one python file at a time. Change docstring of TestEnv to document results_dir key for target config instead of test config. Removed the ability of test conf to change results_dir. The user is controlling the output directory. --- libs/utils/env.py | 61 +++++++++++++++++++++++-------------- libs/utils/test.py | 6 ++-- src/shell/lisa_shell | 51 +++++++++++++++++++++++++------ tests/eas/preliminary.py | 1 - tests/lisa/test_executor.py | 5 +-- 5 files changed, 84 insertions(+), 40 deletions(-) diff --git a/libs/utils/env.py b/libs/utils/env.py index ca025c238..45e01c3a9 100644 --- a/libs/utils/env.py +++ b/libs/utils/env.py @@ -15,7 +15,7 @@ # limitations under the License. # -import datetime +from datetime import datetime import json import logging import os @@ -64,16 +64,20 @@ class TestEnv(ShareState): want to use to run the experiments - a test configuration (test_conf) defining which SW setups we need on that HW target - - a folder to collect the experiments results, which can be specified - using the test_conf::results_dir option and is by default wiped from - all the previous contents (if wipe=True) + - a folder to collect the experiments results, which can be specified using + the target_conf::results_dir option, or using LISA_RESULTS_DIR environment + variable and is by default wiped from all the previous contents + (if wipe=True) :param target_conf: Configuration defining the target to run experiments on. May be - A dict defining the values directly - A path to a JSON file containing the configuration - - ``None``, in which case $LISA_HOME/target.config is used. + - ``None``, in which case: + - LISA_TARGET_CONF environment variable is read to locate a + config file. + - If the variable is not set, $LISA_HOME/target.config is used. You need to provide the information needed to connect to the target. For SSH targets that means "host", "username" and @@ -105,6 +109,9 @@ class TestEnv(ShareState): target. LISA does *not* manage this TFTP server, it must be provided externally. Optional. + **results_dir** + location of results of the experiments. + :param test_conf: Configuration of software for target experiments. Takes the same form as target_conf. Fields are: @@ -137,9 +144,6 @@ class TestEnv(ShareState): buffsize Size of buffer. Default is 10240. - **results_dir** - location of results of the experiments - :param wipe: set true to cleanup all previous content from the output folder :type wipe: bool @@ -200,11 +204,14 @@ class TestEnv(ShareState): self._log.info('Loading custom (inline) target configuration') self.conf = target_conf elif isinstance(target_conf, str): - self._log.info('Loading custom (file) target configuration') + self._log.info('Loading %s target configuration', target_conf) + self.conf = self.loadTargetConfig(target_conf) + else: + target_conf = os.environ.get('LISA_TARGET_CONF', '') + self._log.info('Loading [%s] target configuration', + target_conf or 'default') self.conf = self.loadTargetConfig(target_conf) - elif target_conf is None: - self._log.info('Loading default (file) target configuration') - self.conf = self.loadTargetConfig() + self._log.debug('Target configuration %s', self.conf) # Setup test configuration @@ -239,17 +246,22 @@ class TestEnv(ShareState): if '__features__' not in self.conf: self.conf['__features__'] = [] - # Initialize local results folder - # test configuration overrides target one - self.res_dir = (self.test_conf.get('results_dir') or - self.conf.get('results_dir')) + # Initialize local results folder. + # The test configuration overrides the target's one and the environment + # variable overrides everything else. + self.res_dir = ( + os.getenv('LISA_RESULTS_DIR') or + self.conf.get('results_dir') + ) + # Default result dir based on the current time + if not self.res_dir: + self.res_dir = datetime.now().strftime( + os.path.join(basepath, OUT_PREFIX, '%Y%m%d_%H%M%S') + ) - if self.res_dir and not os.path.isabs(self.res_dir): - self.res_dir = os.path.join(basepath, 'results', self.res_dir) - else: - self.res_dir = os.path.join(basepath, OUT_PREFIX) - self.res_dir = datetime.datetime.now()\ - .strftime(self.res_dir + '/%Y%m%d_%H%M%S') + # Relative paths are interpreted as relative to a fixed root. + if not os.path.isabs(self.res_dir): + self.res_dir = os.path.join(basepath, OUT_PREFIX, self.res_dir) if wipe and os.path.exists(self.res_dir): self._log.warning('Wipe previous contents of the results folder:') @@ -281,7 +293,7 @@ class TestEnv(ShareState): self._initialized = True - def loadTargetConfig(self, filepath='target.config'): + def loadTargetConfig(self, filepath=None): """ Load the target configuration from the specified file. @@ -291,6 +303,9 @@ class TestEnv(ShareState): """ + # "" and None are replaced by the default 'target.config' value + filepath = filepath or 'target.config' + # Loading default target configuration conf_file = os.path.join(basepath, filepath) diff --git a/libs/utils/test.py b/libs/utils/test.py index 29e29051e..5b60f87f6 100644 --- a/libs/utils/test.py +++ b/libs/utils/test.py @@ -271,8 +271,10 @@ experiment_test.__test__ = False # runExperiments, so that if the value is invalid we print the error # immediately instead of going ahead with target setup etc. try: - ITERATIONS_FROM_CMDLINE = int( - os.getenv('LISA_TEST_ITERATIONS', '0')) + iterations = os.getenv('LISA_TEST_ITERATIONS') + # Empty string or 0 will be replaced by 0, otherwise converted to int + ITERATIONS_FROM_CMDLINE = int(iterations) if iterations else 0 + if ITERATIONS_FROM_CMDLINE < 0: raise ValueError('Cannot be negative') except ValueError as e: diff --git a/src/shell/lisa_shell b/src/shell/lisa_shell index b96f2434a..18ac2d088 100755 --- a/src/shell/lisa_shell +++ b/src/shell/lisa_shell @@ -1,3 +1,4 @@ +#! /bin/bash # # SPDX-License-Identifier: Apache-2.0 # @@ -281,13 +282,22 @@ fi function _lisa-test-usage { cat < Date: Wed, 31 Jan 2018 17:21:08 +0000 Subject: [PATCH 3/6] lisa_shell: Use spaces for indentation Use spaces instead of a mixture of spaces and tabs that confuses the automatic detection of indentation style. Also set the vim modeline to align better on Python scripts. --- src/shell/lisa_shell | 120 +++++++++++++++++++++---------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/src/shell/lisa_shell b/src/shell/lisa_shell index 18ac2d088..c9f00d4f2 100755 --- a/src/shell/lisa_shell +++ b/src/shell/lisa_shell @@ -34,9 +34,9 @@ export PYTHONPATH=$LISA_HOME/libs/wlgen:$PYTHONPATH export PYTHONPATH=$LISA_HOME:$PYTHONPATH if [ "x$DEVMODE" == "x1" ]; then - export PYTHONPATH=$LISA_HOME/libs/devlib:$PYTHONPATH - export PYTHONPATH=$LISA_HOME/libs/trappy:$PYTHONPATH - export PYTHONPATH=$LISA_HOME/libs/bart:$PYTHONPATH + export PYTHONPATH=$LISA_HOME/libs/devlib:$PYTHONPATH + export PYTHONPATH=$LISA_HOME/libs/trappy:$PYTHONPATH + export PYTHONPATH=$LISA_HOME/libs/bart:$PYTHONPATH fi ################################################################################ @@ -75,22 +75,22 @@ echo -ne "$LISASHELL_DEFAULT" function _lisa-update-usage { echo "Usage: lisa-update (CMD)" - echo " CMD: what to update (default: all)" - echo " all - update lisa and all the external dependencies" - echo " submodules - update external dependencies provided by submodules" - echo + echo " CMD: what to update (default: all)" + echo " all - update lisa and all the external dependencies" + echo " submodules - update external dependencies provided by submodules" + echo echo "Update submodules (if DEVMODE enabled)" } function _lisa-update-submodules { echo -ne "${LISASHELL_BLUE}" if [ "x$DEVMODE" == "x1" ]; then - # Force update existing modules - echo - echo 'Developer mode ENABLED, updating local libraries...' - git submodule sync - git submodule update --init - echo 'DONE' + # Force update existing modules + echo + echo 'Developer mode ENABLED, updating local libraries...' + git submodule sync + git submodule update --init + echo 'DONE' fi echo -ne "$LISASHELL_DEFAULT" } @@ -146,14 +146,14 @@ CMD=${1:-all} echo case "x${CMD^^}" in 'xSUBMODULES') - _lisa-update-submodules - ;; + _lisa-update-submodules + ;; 'xALL') - _lisa-update-all - ;; + _lisa-update-all + ;; "xHELP"|*) - _lisa-update-usage - ;; + _lisa-update-usage + ;; esac echo echo @@ -165,9 +165,9 @@ echo function _lisa-ipython-usage { echo "Usage: lisa-ipython CMD [NETIF [PORT]]" - echo " CMD - IPython Notebooks command (deafult: start)" - echo " start start the ipython server" - echo " stop stop the ipython server" + echo " CMD - IPython Notebooks command (deafult: start)" + echo " start start the ipython server" + echo " stop stop the ipython server" echo " NETIF - the network interface to start the server on (default: lo)" echo " PORT - the tcp port for the server (default: 8888)" } @@ -175,8 +175,8 @@ function _lisa-ipython-usage { function _lisa-ipython-start { # Get IP address for the specified interface IPADDR=$(/sbin/ifconfig $NETIF 2>/dev/null | \ - awk '/inet / {print $2}' | \ - sed 's/addr://') + awk '/inet / {print $2}' | \ + sed 's/addr://') if [ "x$IPADDR" == "x" ]; then echo echo "$NETIF is not a valid network interface" @@ -198,10 +198,10 @@ URL="http://$IPADDR:$PORT/?token=$TOKEN" # Check if an instance is already running if [ -f "$PIDFILE" ] && pgrep -F $PIDFILE >/dev/null; then - echo "Server already running:" + echo "Server already running:" echo " " $(cat $URLFILE) xdg-open $(cat $URLFILE) - return 1 + return 1 fi # Start the server bindeed to the specified interface @@ -232,7 +232,7 @@ function _lisa-ipython-stop { PYDIR="$LISA_HOME/ipynb" PIDFILE="$PYDIR/server.pid" if [ -f "$PIDFILE" ] && pgrep -F $PIDFILE >/dev/null; then - kill $(<$PIDFILE) 2>/dev/null + kill $(<$PIDFILE) 2>/dev/null fi rm -f $PIDFILE 2>/dev/null } @@ -252,16 +252,16 @@ PORT=${3:-8888} echo case "x${CMD^^}" in 'xSTART') - echo "Starting IPython Notebooks..." - _lisa-ipython-start $NETIF $PORT - ;; + echo "Starting IPython Notebooks..." + _lisa-ipython-start $NETIF $PORT + ;; 'xSTOP') - echo "Stopping IPython Notebooks..." - _lisa-ipython-stop - ;; + echo "Stopping IPython Notebooks..." + _lisa-ipython-stop + ;; "xHELP"|*) - _lisa-ipython-usage - ;; + _lisa-ipython-usage + ;; esac echo echo @@ -271,8 +271,8 @@ function lisa-check-submods { if [ ! -f ./libs/devlib/setup.py ] || [ ! -f ./libs/bart/setup.py ] || [ ! -f ./libs/trappy/setup.py ]; then - echo "One or more submodules missing, updating"; - lisa-update submodules + echo "One or more submodules missing, updating"; + lisa-update submodules fi } @@ -336,9 +336,9 @@ if [ -n "$LISA_RESULTS_DIR" ]; then # same tree to run multiple tests on different boards at the same time. local xunit_options=(--with-xunit --xunit-file="$LISA_RESULTS_DIR/results.xml") fi -nosetests -v --nocapture --nologcapture \ - --logging-config=logging.conf \ - "${xunit_options[@]}" \ +nosetests -v --nocapture --nologcapture \ + --logging-config=logging.conf \ + "${xunit_options[@]}" \ "$@" } @@ -396,11 +396,11 @@ CMD=${1^^} echo case "x${CMD^^}" in 'xREPORT') - ./tools/report.py $* - ;; + ./tools/report.py $* + ;; "xHELP"|*) - ./tools/report.py --help - ;; + ./tools/report.py --help + ;; esac echo echo @@ -427,8 +427,8 @@ export WA_USER_DIRECTORY="$LISA_HOME/tools/wa_user_directory" # If the python virtual env existis: # let's assume everithing has been already setup and we are ready to go if [ -d $WLTEST_VENV ]; then - source $WLTEST_VENV/bin/activate - return 0 + source $WLTEST_VENV/bin/activate + return 0 fi # Check for require dependencies @@ -436,14 +436,14 @@ which virtualenv &>/dev/null if [ $? -ne 0 ]; then cat < pip install virtualenv + Please install virtualenv before running this command. + You can install it on Ubuntu systems with: + $> pip install virtualenv EOF - return -1 + return -1 fi # Create and activate a python's virtual environment to be used for the @@ -466,26 +466,26 @@ function lisa-wltest-series { if [ -z $ANDROID_HOME ]; then cat </dev/null if [ $? -ne 0 ]; then - cat < sudo apt-get install coreutils + You can install it on Ubuntu systems with: + $> sudo apt-get install coreutils EOF - return -1 + return -1 fi # Ensure the wltest environment has been configured, and get the relative @@ -546,4 +546,4 @@ EOF # Setup default SHELL text color echo -e "$LISASHELL_DEFAULT" -# vim: set tabstop=4: +# vim :set tabstop=4 shiftwidth=4 textwidth=80 expandtab -- GitLab From e4e5dd22b3a3d2da03247d095c52691c3b37d8da Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 6 Feb 2018 16:16:15 +0000 Subject: [PATCH 4/6] lisa_shell: Only use colored output on terminals Disable output coloring when the output is not a terminal. This avoids getting garbage output when redirecting to a text file to save a log for example. Also avoid using clear command for the same reasons. Update lisa_colors vim modeline to align on other scripts. --- src/shell/lisa_colors | 43 +++++++++++++++++++++++-------------------- src/shell/lisa_shell | 14 ++++++++++++-- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/src/shell/lisa_colors b/src/shell/lisa_colors index 2b4a7fdf0..e86eca2d2 100644 --- a/src/shell/lisa_colors +++ b/src/shell/lisa_colors @@ -32,24 +32,27 @@ # cyan 36 46 # white 37 47 -LISASHELL_WHITE="\033[1;37m" -LISASHELL_LGRAY="\033[37m" -LISASHELL_GRAY="\033[1;30m" -LISASHELL_BLACK="\033[30m" -LISASHELL_RED="\033[31m" -LISASHELL_LRED="\033[1;31m" -LISASHELL_GREEN="\033[32m" -LISASHELL_LGREEN="\033[1;32m" -LISASHELL_BROWN="\033[33m" -LISASHELL_YELLOW="\033[1;33m" -LISASHELL_BLUE="\033[34m" -LISASHELL_LBLUE="\033[1;34m" -LISASHELL_PURPLE="\033[35m" -LISASHELL_PINK="\033[1;35m" -LISASHELL_CYAN="\033[36m" -LISASHELL_LCYAN="\033[1;36m" +if [[ -t 1 ]]; then + LISASHELL_WHITE="\033[1;37m" + LISASHELL_LGRAY="\033[37m" + LISASHELL_GRAY="\033[1;30m" + LISASHELL_BLACK="\033[30m" + LISASHELL_RED="\033[31m" + LISASHELL_LRED="\033[1;31m" + LISASHELL_GREEN="\033[32m" + LISASHELL_LGREEN="\033[1;32m" + LISASHELL_BROWN="\033[33m" + LISASHELL_YELLOW="\033[1;33m" + LISASHELL_BLUE="\033[34m" + LISASHELL_LBLUE="\033[1;34m" + LISASHELL_PURPLE="\033[35m" + LISASHELL_PINK="\033[1;35m" + LISASHELL_CYAN="\033[36m" + LISASHELL_LCYAN="\033[1;36m" + LISASHELL_RESET="\033[0m" + LISASHELL_DEFAULT=$LISASHELL_WHITE + LISASHELL_HELP="\033[42m" + LISASHELL_BANNER="\033[44m" +fi -LISASHELL_RESET="\033[0m" -LISASHELL_DEFAULT=$LISASHELL_WHITE - -# vim: set tabstop=4: +# vim :set tabstop=4 shiftwidth=4 textwidth=80 expandtab diff --git a/src/shell/lisa_shell b/src/shell/lisa_shell index c9f00d4f2..5c0ebbffa 100755 --- a/src/shell/lisa_shell +++ b/src/shell/lisa_shell @@ -39,6 +39,16 @@ if [ "x$DEVMODE" == "x1" ]; then export PYTHONPATH=$LISA_HOME/libs/bart:$PYTHONPATH fi +################################################################################ +# Helpers +################################################################################ + +# Only clear the screen if stdout is a terminal, to avoid ASCII escape +# characters to be sent to a log file for example. +function clear { +test -t 1 && command clear +} + ################################################################################ # Generic LISA Shell commands ################################################################################ @@ -46,7 +56,7 @@ fi # LISA Shell On-Line HELP function lisa-help { clear -echo -ne '\E[37;42m' +echo -e "$LISASHELL_HELP" echo " " echo " .:: LISA Shell - HELP On-Line ::. " echo " " @@ -513,7 +523,7 @@ PS1="\[${LISASHELL_BLUE}\][LISAShell \[${LISASHELL_LCYAN}\]\W\[${LISASHELL_BLUE} # Dump out a nice LISA Shell logo clear -echo -e '\E[37;44m' +echo -e "$LISASHELL_BANNER" echo " " echo " .:: LISA Shell ::. " -- GitLab From 7c2625bcd80e95120d248dc6f25652b1b603aa1d Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 13 Feb 2018 16:03:33 +0000 Subject: [PATCH 5/6] Python scripts: add textwidth=80 to vim modeline --- libs/utils/analysis/cpus_analysis.py | 2 +- libs/utils/analysis/eas_analysis.py | 2 +- libs/utils/analysis/frequency_analysis.py | 2 +- libs/utils/analysis/functions_analysis.py | 2 +- libs/utils/analysis/idle_analysis.py | 2 +- libs/utils/analysis/latency_analysis.py | 2 +- libs/utils/analysis/status_analysis.py | 2 +- libs/utils/analysis/tasks_analysis.py | 2 +- libs/utils/analysis/thermal_analysis.py | 2 +- libs/utils/analysis_module.py | 2 +- libs/utils/analysis_register.py | 2 +- libs/utils/android/benchmark.py | 2 +- libs/utils/android/screen.py | 2 +- libs/utils/android/system.py | 2 +- libs/utils/android/viewer.py | 2 +- libs/utils/android/workload.py | 2 +- libs/utils/android/workloads/exoplayer.py | 2 +- libs/utils/android/workloads/geekbench.py | 2 +- libs/utils/android/workloads/gmaps.py | 2 +- libs/utils/android/workloads/jankbench.py | 2 +- libs/utils/android/workloads/pcmark.py | 2 +- libs/utils/android/workloads/uibench.py | 2 +- libs/utils/android/workloads/vellamo.py | 2 +- libs/utils/android/workloads/youtube.py | 2 +- libs/utils/energy.py | 2 +- libs/utils/env.py | 2 +- libs/utils/executor.py | 2 +- libs/utils/git.py | 2 +- libs/utils/test.py | 2 +- libs/utils/trace.py | 2 +- tests/benchmarks/android_geekbench.py | 2 +- tests/benchmarks/android_gmaps.py | 2 +- tests/benchmarks/android_jankbench.py | 2 +- tests/benchmarks/android_uibench.py | 2 +- tests/benchmarks/android_vellamo.py | 2 +- tests/benchmarks/android_youtube.py | 2 +- tests/eas/rfc.py | 2 +- tests/sfreq/smoke_test.py | 2 +- tests/stune/smoke_test_ramp.py | 2 +- 39 files changed, 39 insertions(+), 39 deletions(-) diff --git a/libs/utils/analysis/cpus_analysis.py b/libs/utils/analysis/cpus_analysis.py index d70e64c60..60d6f3128 100644 --- a/libs/utils/analysis/cpus_analysis.py +++ b/libs/utils/analysis/cpus_analysis.py @@ -211,4 +211,4 @@ class CpusAnalysis(AnalysisModule): figsize=(16, 8)) ax.grid() -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis/eas_analysis.py b/libs/utils/analysis/eas_analysis.py index 26fcfd56c..cd4870a50 100644 --- a/libs/utils/analysis/eas_analysis.py +++ b/libs/utils/analysis/eas_analysis.py @@ -398,4 +398,4 @@ class EasAnalysis(AnalysisModule): .format(self._trace.plots_dir, self._trace.plots_prefix) pl.savefig(figname, bbox_inches='tight') -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis/frequency_analysis.py b/libs/utils/analysis/frequency_analysis.py index c29f330fd..6d061f9ae 100644 --- a/libs/utils/analysis/frequency_analysis.py +++ b/libs/utils/analysis/frequency_analysis.py @@ -916,4 +916,4 @@ class FrequencyAnalysis(AnalysisModule): entity_name, figtype) pl.savefig(figname, bbox_inches='tight') -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis/functions_analysis.py b/libs/utils/analysis/functions_analysis.py index 7ae3d21f2..aeb1e0006 100644 --- a/libs/utils/analysis/functions_analysis.py +++ b/libs/utils/analysis/functions_analysis.py @@ -78,4 +78,4 @@ class FunctionsAnalysis(AnalysisModule): axes.set_ylabel(ylabel) axes.get_xaxis().set_visible(False) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis/idle_analysis.py b/libs/utils/analysis/idle_analysis.py index 2de48901a..7db521902 100644 --- a/libs/utils/analysis/idle_analysis.py +++ b/libs/utils/analysis/idle_analysis.py @@ -321,4 +321,4 @@ class IdleAnalysis(AnalysisModule): pl.savefig(figname, bbox_inches='tight') -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis/latency_analysis.py b/libs/utils/analysis/latency_analysis.py index 22e490a14..86fb2e5b1 100644 --- a/libs/utils/analysis/latency_analysis.py +++ b/libs/utils/analysis/latency_analysis.py @@ -910,4 +910,4 @@ class LatencyAnalysis(AnalysisModule): return CDF(df, threshold, above, below) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis/status_analysis.py b/libs/utils/analysis/status_analysis.py index 823465823..a09f71c0c 100644 --- a/libs/utils/analysis/status_analysis.py +++ b/libs/utils/analysis/status_analysis.py @@ -107,4 +107,4 @@ class StatusAnalysis(AnalysisModule): end = start + delta axes.axvspan(start, end, facecolor='r', alpha=0.1) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis/tasks_analysis.py b/libs/utils/analysis/tasks_analysis.py index 36d126bb0..d34241cd4 100644 --- a/libs/utils/analysis/tasks_analysis.py +++ b/libs/utils/analysis/tasks_analysis.py @@ -798,4 +798,4 @@ class TasksAnalysis(AnalysisModule): if 'sched_overutilized' in signals: self._trace.analysis.status.plotOverutilized(axes) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis/thermal_analysis.py b/libs/utils/analysis/thermal_analysis.py index 2c8666221..93e2b04aa 100644 --- a/libs/utils/analysis/thermal_analysis.py +++ b/libs/utils/analysis/thermal_analysis.py @@ -287,4 +287,4 @@ class ThermalAnalysis(AnalysisModule): cpumasks = df['cpus'].unique().tolist() return [m for m in cpumasks if m & global_mask] -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis_module.py b/libs/utils/analysis_module.py index 931e2f880..c51868dfd 100644 --- a/libs/utils/analysis_module.py +++ b/libs/utils/analysis_module.py @@ -181,4 +181,4 @@ class AnalysisModule(object): return ax -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/analysis_register.py b/libs/utils/analysis_register.py index a42b05936..ba881a0dd 100644 --- a/libs/utils/analysis_register.py +++ b/libs/utils/analysis_register.py @@ -73,4 +73,4 @@ class AnalysisRegister(object): setattr(self, module_name, handler(trace)) self._log.debug(' %s', module_name) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/benchmark.py b/libs/utils/android/benchmark.py index a33fd68cd..5d81e72b0 100644 --- a/libs/utils/android/benchmark.py +++ b/libs/utils/android/benchmark.py @@ -399,4 +399,4 @@ class LisaBenchmark(object): return rebooted -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/screen.py b/libs/utils/android/screen.py index 6a81395b7..27cb2ed8c 100644 --- a/libs/utils/android/screen.py +++ b/libs/utils/android/screen.py @@ -155,4 +155,4 @@ class Screen(object): System.menu(target) System.home(target) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/system.py b/libs/utils/android/system.py index 047c8c4a9..8890eed94 100644 --- a/libs/utils/android/system.py +++ b/libs/utils/android/system.py @@ -518,4 +518,4 @@ class System(object): return packages return None -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/viewer.py b/libs/utils/android/viewer.py index 18ff0f57a..4133ff606 100644 --- a/libs/utils/android/viewer.py +++ b/libs/utils/android/viewer.py @@ -149,4 +149,4 @@ class ViewerWorkload(Workload): # Switch back to screen auto rotation Screen.set_orientation(self._target, auto=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workload.py b/libs/utils/android/workload.py index 7387f5055..d04fbb9ca 100644 --- a/libs/utils/android/workload.py +++ b/libs/utils/android/workload.py @@ -165,4 +165,4 @@ class Workload(object): self._log.warning('No trace collected since last run') -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workloads/exoplayer.py b/libs/utils/android/workloads/exoplayer.py index 595b8e087..3dc461b06 100644 --- a/libs/utils/android/workloads/exoplayer.py +++ b/libs/utils/android/workloads/exoplayer.py @@ -190,4 +190,4 @@ class ExoPlayer(Workload): # Close and clear application System.force_stop(self._target, self.package, clear=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workloads/geekbench.py b/libs/utils/android/workloads/geekbench.py index 9480ffd42..d016d5f7e 100644 --- a/libs/utils/android/workloads/geekbench.py +++ b/libs/utils/android/workloads/geekbench.py @@ -151,4 +151,4 @@ class Geekbench(Workload): # Set brightness back to auto Screen.set_brightness(self._target, auto=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workloads/gmaps.py b/libs/utils/android/workloads/gmaps.py index 729434269..4fd973249 100644 --- a/libs/utils/android/workloads/gmaps.py +++ b/libs/utils/android/workloads/gmaps.py @@ -138,4 +138,4 @@ class GMaps(Workload): # Switch back to screen auto rotation Screen.set_orientation(self._target, auto=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workloads/jankbench.py b/libs/utils/android/workloads/jankbench.py index 5d17ded92..e9c067353 100644 --- a/libs/utils/android/workloads/jankbench.py +++ b/libs/utils/android/workloads/jankbench.py @@ -188,4 +188,4 @@ class Jankbench(Workload): # Set brightness back to auto Screen.set_brightness(self._target, auto=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workloads/pcmark.py b/libs/utils/android/workloads/pcmark.py index 0ddb7dadc..62ffe0b47 100644 --- a/libs/utils/android/workloads/pcmark.py +++ b/libs/utils/android/workloads/pcmark.py @@ -178,4 +178,4 @@ class PCMark(Workload): # Set brightness back to auto Screen.set_brightness(self._target, auto=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workloads/uibench.py b/libs/utils/android/workloads/uibench.py index 3b24030ee..91a69e4f5 100755 --- a/libs/utils/android/workloads/uibench.py +++ b/libs/utils/android/workloads/uibench.py @@ -161,4 +161,4 @@ class UiBench(Workload): System.set_airplane_mode(self._target, on=False) Screen.set_brightness(self._target, auto=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workloads/vellamo.py b/libs/utils/android/workloads/vellamo.py index c8863e8d2..71c71eeaa 100644 --- a/libs/utils/android/workloads/vellamo.py +++ b/libs/utils/android/workloads/vellamo.py @@ -174,4 +174,4 @@ class Vellamo(Workload): # Set brightness back to auto Screen.set_brightness(self._target, auto=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/android/workloads/youtube.py b/libs/utils/android/workloads/youtube.py index cdfbf2d04..65c82b15c 100644 --- a/libs/utils/android/workloads/youtube.py +++ b/libs/utils/android/workloads/youtube.py @@ -112,4 +112,4 @@ class YouTube(Workload): # Set brightness back to auto Screen.set_brightness(self._target, auto=True) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/energy.py b/libs/utils/energy.py index 1027329f6..2281a4b0f 100644 --- a/libs/utils/energy.py +++ b/libs/utils/energy.py @@ -537,4 +537,4 @@ class Gem5EnergyMeter(_DevlibContinuousEnergyMeter): df.index = timeline return df -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/env.py b/libs/utils/env.py index 45e01c3a9..34eeef148 100644 --- a/libs/utils/env.py +++ b/libs/utils/env.py @@ -1101,4 +1101,4 @@ IFCFG_BCAST_RE = re.compile( r'Bcast:(.*) ' ) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/executor.py b/libs/utils/executor.py index bacc26a22..2a3c2e683 100644 --- a/libs/utils/executor.py +++ b/libs/utils/executor.py @@ -803,4 +803,4 @@ FMT_HEADER = r'{:=<80}'.format('') FMT_TITLE = r'{:~<80}'.format('') FMT_FOOTER = r'{:-<80}'.format('') -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/git.py b/libs/utils/git.py index 6a9e07c33..879338e90 100644 --- a/libs/utils/git.py +++ b/libs/utils/git.py @@ -55,4 +55,4 @@ class Git(object): return min(possibles, key=len) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/test.py b/libs/utils/test.py index 5b60f87f6..d3c30928b 100644 --- a/libs/utils/test.py +++ b/libs/utils/test.py @@ -280,4 +280,4 @@ try: except ValueError as e: raise ValueError("Couldn't read iterations count: {}".format(e)) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/libs/utils/trace.py b/libs/utils/trace.py index 57a695769..b4aeaff98 100644 --- a/libs/utils/trace.py +++ b/libs/utils/trace.py @@ -879,4 +879,4 @@ class TraceData: """ A DataFrame collector exposed to Trace's clients """ pass -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/benchmarks/android_geekbench.py b/tests/benchmarks/android_geekbench.py index 72198a9dc..6b4681747 100755 --- a/tests/benchmarks/android_geekbench.py +++ b/tests/benchmarks/android_geekbench.py @@ -120,4 +120,4 @@ for governor in governors: # We want to collect data from at least one governor assert(tests_completed >= 1) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/benchmarks/android_gmaps.py b/tests/benchmarks/android_gmaps.py index f13a4ef81..4b718b5b0 100755 --- a/tests/benchmarks/android_gmaps.py +++ b/tests/benchmarks/android_gmaps.py @@ -125,4 +125,4 @@ for governor in governors: # We want to collect data from at least one governor assert(tests_completed >= 1) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/benchmarks/android_jankbench.py b/tests/benchmarks/android_jankbench.py index 3a87f8659..9d14a4a85 100755 --- a/tests/benchmarks/android_jankbench.py +++ b/tests/benchmarks/android_jankbench.py @@ -130,4 +130,4 @@ for governor in governors: # We want to collect data from at least one governor assert(tests_completed >= 1) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/benchmarks/android_uibench.py b/tests/benchmarks/android_uibench.py index 541211a07..0d3f761de 100755 --- a/tests/benchmarks/android_uibench.py +++ b/tests/benchmarks/android_uibench.py @@ -142,4 +142,4 @@ for governor in governors: # We want to collect data from at least one governor assert(tests_completed >= 1) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/benchmarks/android_vellamo.py b/tests/benchmarks/android_vellamo.py index 6a13f0aa6..4d33ab373 100755 --- a/tests/benchmarks/android_vellamo.py +++ b/tests/benchmarks/android_vellamo.py @@ -123,4 +123,4 @@ for governor in governors: # We want to collect data from at least one governor assert(tests_completed >= 1) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/benchmarks/android_youtube.py b/tests/benchmarks/android_youtube.py index ffb3d409e..34085502a 100755 --- a/tests/benchmarks/android_youtube.py +++ b/tests/benchmarks/android_youtube.py @@ -124,4 +124,4 @@ for governor in governors: # We want to collect data from at least one governor assert(tests_completed >= 1) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/eas/rfc.py b/tests/eas/rfc.py index 7911b6a04..d55f8bc82 100644 --- a/tests/eas/rfc.py +++ b/tests/eas/rfc.py @@ -37,4 +37,4 @@ class RFC(LisaTest): """A dummy test just to run configured workloads""" pass -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/sfreq/smoke_test.py b/tests/sfreq/smoke_test.py index f63a08274..cc091e384 100644 --- a/tests/sfreq/smoke_test.py +++ b/tests/sfreq/smoke_test.py @@ -37,4 +37,4 @@ class SFreq(LisaTest): """Check that there is not regression on energy""" # TODO -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/tests/stune/smoke_test_ramp.py b/tests/stune/smoke_test_ramp.py index d34c0275b..4331f7033 100644 --- a/tests/stune/smoke_test_ramp.py +++ b/tests/stune/smoke_test_ramp.py @@ -100,4 +100,4 @@ class STune(LisaTest): .format(boost / 100.) self.assertTrue(analyzer.assertStatement(statement), msg=error_msg) -# vim :set tabstop=4 shiftwidth=4 expandtab +# vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 -- GitLab From 13ef0a29a4e8b973cf710689929b54ee36596600 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Wed, 21 Feb 2018 10:57:53 +0000 Subject: [PATCH 6/6] lisa_shell: Show LISA commit in lisa-version Also show it in the startup banner. --- src/shell/lisa_shell | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shell/lisa_shell b/src/shell/lisa_shell index 5c0ebbffa..62cd56322 100755 --- a/src/shell/lisa_shell +++ b/src/shell/lisa_shell @@ -71,6 +71,7 @@ cat <