提交 6c9a8541 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!93 fix bug: update the path of poly UT

Merge pull request !93 from hujiahui8/poly_gpu
......@@ -14,6 +14,7 @@
* limitations under the License.
*/
#define PATH_MAX 4096
#define MAX_PATH_DEPTH 20
#include <fstream>
#include <unistd.h>
#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 "";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册