From c876dff12091a254a39867946be1c1acb9544eea Mon Sep 17 00:00:00 2001 From: hujiahui8 Date: Thu, 30 Jul 2020 18:05:43 +0800 Subject: [PATCH] fix bug: update the path of poly UT --- tests/unittest_cpp/src/base/schedule_tree_helper.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unittest_cpp/src/base/schedule_tree_helper.cc b/tests/unittest_cpp/src/base/schedule_tree_helper.cc index d6c8d6e..ea81c25 100644 --- a/tests/unittest_cpp/src/base/schedule_tree_helper.cc +++ b/tests/unittest_cpp/src/base/schedule_tree_helper.cc @@ -14,6 +14,7 @@ * limitations under the License. */ #define PATH_MAX 4096 +#define MAX_PATH_DEPTH 20 #include #include #include "poly/poly_util.h" @@ -86,8 +87,7 @@ std::string ScheduleTreeHelper::UndoPrettyPrintSchTree(const std::string &schedu } std::string ScheduleTreeHelper::GetPolyPassCasePath() { - std::string relative_path("/test/unittest_cpp/src/poly_pass_case/"); - int max_path_depth = 16; + std::string relative_path("/tests/unittest_cpp/src/poly_pass_case/"); char cwd[PATH_MAX]; char *ret = getcwd(cwd, sizeof(cwd)); @@ -113,7 +113,7 @@ std::string ScheduleTreeHelper::GetPolyPassCasePath() { } dirname = parent_path; ++path_depth_count; - if (path_depth_count > max_path_depth) { + if (path_depth_count > MAX_PATH_DEPTH) { LOG(WARNING) << "Failed to find " << relative_path << " file."; return ""; } -- GitLab