Currently, srcdir in update_version just seek the dir like tests,
site-tests, and other configurable place to find the src, but some times
src can be in dir profilers, like client/profilers/powertop/src.
To fix this problem, add update_version to walk the folder profilers,

Signed-off-by: Mike Qiu <[email protected]>
---
 client/shared/base_utils.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/client/shared/base_utils.py b/client/shared/base_utils.py
index e38baf6..0b280fc 100644
--- a/client/shared/base_utils.py
+++ b/client/shared/base_utils.py
@@ -772,10 +772,11 @@ def update_version(srcdir, preserve_srcdir, new_version, 
install,
         base_autotest = os.path.abspath(os.path.join(module_parent, "..", 
".."))
         tests_dir = os.path.join(base_autotest, 'tests')
         site_tests_dir = os.path.join(base_autotest, 'site-tests')
+        profilers_dir = os.path.join(base_autotest, 'profilers')
         other_tests_dir = GLOBAL_CONFIG.get_config_value("COMMON", "test_dir",
                                                          default="")
         source_code_dir = ""
-        for d in [other_tests_dir, site_tests_dir, tests_dir]:
+        for d in [other_tests_dir, site_tests_dir, tests_dir, profilers_dir]:
             source_code_dir = os.path.join(d, module_name, "src")
             if os.path.isdir(source_code_dir):
                 break
-- 
1.7.7.6

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to