diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2015-01-06 21:05:03 +0100 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2015-01-07 11:27:23 -0800 |
commit | ae87fbaaae75ddb09e6e32d9acc1da74196f8898 (patch) | |
tree | db2c4a3f3852263c9b305755a9e3adff724240b3 /piglit | |
parent | 4f43b7d92bcde17fd837e7764db82d6b04524758 (diff) |
Change placment of the orientation of sys.path
The modification should to the beginning of sys.path not to the end,
because otherwise it hits every package which has tests submodule (which
seems to be like all of them ;)).
The first change is just to make abs_libdir more pretty.
Signed-off-by: Matěj Cepl <mcepl@redhat.com>
Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'piglit')
-rwxr-xr-x | piglit | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -91,10 +91,10 @@ def setup_module_search_path(): abs_bindir = abs_script_dir script_basename_noext = os.path.splitext(os.path.basename(__file__))[0] for libdir in ('lib64', 'lib32', 'lib'): - abs_libdir = path.join(abs_bindir, '..', libdir) + abs_libdir = path.normpath(path.join(abs_bindir, '..', libdir)) abs_data_dir = path.join(abs_libdir, script_basename_noext) if is_piglit_data_dir(abs_data_dir): - sys.path.append(abs_data_dir) + sys.path.insert(0, abs_data_dir) return print('error: failed to find piglit data directory. exiting...', file=sys.stderr) |