constants: fix _TEST_LIB_PATH setting
The variable name implied this was the lib/ subdir, but in reality it
is the lib/constants.py file. The only user of it previously worked
around this by using os.path.dirname instead of fixing its meaning.
BUG=chromium:937944
TEST=precq passes
Change-Id: I4cecdc7d800f5964b14ab6a54122be56cc78d911
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crostestutils/+/1499706
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/lib/constants.py b/lib/constants.py
index ccc5527..75eb113 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -9,16 +9,16 @@
import os
-_TEST_LIB_PATH = os.path.realpath(__file__)
+_TEST_LIB_PATH = os.path.dirname(os.path.realpath(__file__))
CROSTESTUTILS_DIR = os.path.dirname(_TEST_LIB_PATH)
-CROS_PLATFORM_ROOT = os.path.join(CROSTESTUTILS_DIR, '..', '..')
+CROS_PLATFORM_ROOT = os.path.join(CROSTESTUTILS_DIR, '..')
DEFAULT_CHROOT_DIR = 'chroot'
SOURCE_ROOT = os.path.realpath(os.path.join(
- os.path.dirname(_TEST_LIB_PATH), '..', '..', '..', '..'))
+ _TEST_LIB_PATH, '..', '..', '..', '..'))
CROSUTILS_DIR = os.path.join(SOURCE_ROOT, 'src', 'scripts')