From b6a92d0825b0eb63f4b8db837f1f365a3a22a4aa Mon Sep 17 00:00:00 2001 From: mlangkabel Date: Mon, 25 Jan 2021 21:18:08 +0100 Subject: [PATCH] fix python indexer call in tests --- src/test/PythonIndexerTestSuite.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/test/PythonIndexerTestSuite.cpp b/src/test/PythonIndexerTestSuite.cpp index b11c9975..ab9cc937 100644 --- a/src/test/PythonIndexerTestSuite.cpp +++ b/src/test/PythonIndexerTestSuite.cpp @@ -57,6 +57,10 @@ std::shared_ptr parseCode(std::string code) const FilePath workingDirectory(L"."); std::vector args; + args.push_back(FilePath("../app") + .getConcatenated(ResourcePaths::getPythonIndexerFilePath()) + .makeAbsolute() + .wstr()); args.push_back(L"index"); args.push_back(L"--source-file-path=%{SOURCE_FILE_PATH}"); args.push_back(L"--database-file-path=%{DATABASE_FILE_PATH}"); @@ -64,9 +68,11 @@ std::shared_ptr parseCode(std::string code) std::shared_ptr indexerCommand = std::make_shared( INDEXER_COMMAND_PYTHON, - L"\"" + - FilePath("../app").getConcatenated(ResourcePaths::getPythonPath()).makeAbsolute().wstr() + - L"SourcetrailPythonIndexer\"", + + FilePath("../app") + .getConcatenated(ResourcePaths::getPythonEnvironmentFilePath()) + .makeAbsolute() + .wstr(), args, rootPath, tempDbPath, @@ -83,8 +89,8 @@ std::shared_ptr parseCode(std::string code) true, &errorMessage); - REQUIRE(result == 0); REQUIRE(errorMessage.empty()); + REQUIRE(result == 0); } std::shared_ptr testStorage;