kunit: run kunit_tool from any directory
authorHeidi Fahim <heidifahim@google.com>
Tue, 18 Feb 2020 22:19:16 +0000 (14:19 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 19 Feb 2020 22:58:07 +0000 (15:58 -0700)
commitbe886ba90cce2fb2f5a4dbcda8f3be3fd1b2f484
tree8c07ab9fd9e4509b1a1252c3251452b91aae1cee
parentdde54b9492a8ba46bcd7e7e26172adf2bfcea817
kunit: run kunit_tool from any directory

Implemented small fix so that the script changes work directories to the
root of the linux kernel source tree from which kunit.py is run. This
enables the user to run kunit from any working directory. Originally
considered using os.path.join but this is more error prone as we would
have to find all file path usages and modify them accordingly. Using
os.chdir ensures that the entire script is run within /linux.

Signed-off-by: Heidi Fahim <heidifahim@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit.py