Fix query integration test because of config. Fix hardcoded queries not working because of include bug.
Summary: #1 Hardcoded query integration test was failling because the .so files couldn't be linked, because of wrong compiled directory path (missing config flag). #2 Hardcoded query not working in production because typed_value changed so some includes didn't work. Reviewers: florijan, buda Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D90
This commit is contained in:
@@ -362,7 +362,7 @@ endif()
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
execute_process(
|
||||
COMMAND ./recursive_include --roots ${src_dir} ${libs_dir} --start ${src_dir}/query/plan_interface.hpp --copy ${CMAKE_BINARY_DIR}/include
|
||||
COMMAND ./recursive_include --roots ${src_dir} ${libs_dir} --start ${src_dir}/query/plan_template_cpp --copy ${CMAKE_BINARY_DIR}/include
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake
|
||||
)
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ class PlanCompiler : public Loggable {
|
||||
in_file, // input file
|
||||
"-o", out_file, // ouput file
|
||||
"-I./include", "-I../include", "-I../../include", "-I../../../include",
|
||||
"-I./libs/fmt", "-I../libs/fmt", "-I../../libs/fmt", "-I../../../libs/fmt",
|
||||
"-L./ -L../ -L../../", "-lmemgraph_pic",
|
||||
"-I./libs/fmt", "-I../libs/fmt", "-I../../libs/fmt",
|
||||
"-I../../../libs/fmt", "-L./ -L../ -L../../", "-lmemgraph_pic",
|
||||
"-shared -fPIC" // shared library flags
|
||||
);
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "query/util.hpp"
|
||||
#include "communication/bolt/v1/serialization/record_stream.hpp"
|
||||
#include "io/network/socket.hpp"
|
||||
#include "query/backend/cpp/typed_value.hpp"
|
||||
#include "query/plan_interface.hpp"
|
||||
#include "storage/model/properties/all.hpp"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
@@ -74,6 +74,6 @@ class Config {
|
||||
}
|
||||
}
|
||||
|
||||
std::string operator[](const char* key) { return dict[key]; }
|
||||
std::string& operator[](const char* key) { return dict[key]; }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define HARDCODED_OUTPUT_STREAM
|
||||
|
||||
#include "config/config.hpp"
|
||||
#include "dbms/dbms.hpp"
|
||||
#include "query_engine_common.hpp"
|
||||
|
||||
@@ -23,6 +26,9 @@ int main(int argc, char *argv[]) {
|
||||
* init engine
|
||||
*/
|
||||
auto log = init_logging("IntegrationQueryEngine");
|
||||
// Manually set config compile_path to avoid loading whole config file with
|
||||
// the test.
|
||||
CONFIG(config::COMPILE_PATH) = "../compiled/";
|
||||
Dbms dbms;
|
||||
StreamT stream(std::cout);
|
||||
QueryEngineT query_engine;
|
||||
|
||||
Reference in New Issue
Block a user