diff --git a/scripts/avocado b/scripts/avocado index f81893c1698a1f5ce1a0f4a6a912d85fb4c5bfd4..7b04c53fb07982e48cd9d266a99586530786d2a4 100755 --- a/scripts/avocado +++ b/scripts/avocado @@ -56,14 +56,6 @@ def handle_exception(*exc_info): sys.exit(-1) -# simple magic for using scripts within a source tree -basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -if os.path.isdir(os.path.join(basedir, 'avocado')): - os.environ['PATH'] += ":" + os.path.join(basedir, 'scripts') - os.environ['PATH'] += ":" + os.path.join(basedir, 'libexec') - sys.path.append(basedir) - - if __name__ == '__main__': sys.excepthook = handle_exception from avocado.core.app import AvocadoApp diff --git a/scripts/avocado-rest-client b/scripts/avocado-rest-client index dc02b21f3d1a75f39b8078fb52598b6a9b81f35f..01addfb328f7b00113976af3c73cd5ce58ba9b6a 100755 --- a/scripts/avocado-rest-client +++ b/scripts/avocado-rest-client @@ -14,14 +14,8 @@ # Author: Cleber Rosa -import os import sys -# simple magic for using scripts within a source tree -basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -if os.path.isdir(os.path.join(basedir, 'avocado')): - sys.path.append(basedir) - from avocado.core.restclient.cli.app import App if __name__ == '__main__': diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py index 0963ec960d47e70061535d8e876425c64d2eac0a..5eef658cb2be31e425deaadf8b9582960aa1df48 100644 --- a/selftests/functional/test_basic.py +++ b/selftests/functional/test_basic.py @@ -763,6 +763,11 @@ class RunnerSimpleTest(unittest.TestCase): simplewarning.sh uses the avocado-bash-utils """ os.chdir(basedir) + # simplewarning.sh calls "avocado" without specifying a path + os.environ['PATH'] += ":" + os.path.join(basedir, 'scripts') + # simplewarning.sh calls "avocado exec-path" which hasn't + # access to an installed location for the libexec scripts + os.environ['PATH'] += ":" + os.path.join(basedir, 'libexec') cmd_line = ('%s run --job-results-dir %s --sysinfo=off ' 'examples/tests/simplewarning.sh --show-job-log' % (AVOCADO, self.tmpdir))