avoid using source tree location to locate binaries
@@ -10,34 +10,34 @@ using vespalib::eval::test::TensorConformance;
using vespalib::tensor::DefaultTensorEngine;
using vespalib::make_string;
-vespalib::string module_path(TEST_PATH("../../../../"));
-
+vespalib::string module_src_path(TEST_PATH("../../../../"));
+vespalib::string module_build_path("../../../../");
TEST("require that reference tensor implementation passes all conformance tests") {
- TEST_DO(TensorConformance::run_tests(module_path, SimpleTensorEngine::ref()));
+ TEST_DO(TensorConformance::run_tests(module_src_path, SimpleTensorEngine::ref()));
}
TEST("require that production tensor implementation passes all conformance tests") {
- TEST_DO(TensorConformance::run_tests(module_path, DefaultTensorEngine::ref()));
+ TEST_DO(TensorConformance::run_tests(module_src_path, DefaultTensorEngine::ref()));
}
TEST("require that tensor serialization test spec can be generated") {
- vespalib::string spec = module_path + "src/apps/make_tensor_binary_format_test_spec/test_spec.json";
- vespalib::string binary = module_path + "src/apps/make_tensor_binary_format_test_spec/eval_make_tensor_binary_format_test_spec_app";
+ vespalib::string spec = module_src_path + "src/apps/make_tensor_binary_format_test_spec/test_spec.json";
+ vespalib::string binary = module_build_path + "src/apps/make_tensor_binary_format_test_spec/eval_make_tensor_binary_format_test_spec_app";
EXPECT_EQUAL(system(make_string("%s > binary_test_spec.json", binary.c_str()).c_str()), 0);
EXPECT_EQUAL(system(make_string("diff -u %s binary_test_spec.json", spec.c_str()).c_str()), 0);
}
TEST("require that cross-language tensor conformance test spec can be generated") {
- vespalib::string spec = module_path + "src/apps/tensor_conformance/test_spec.json";
- vespalib::string binary = module_path + "src/apps/tensor_conformance/vespa-tensor-conformance";
+ vespalib::string spec = module_src_path + "src/apps/tensor_conformance/test_spec.json";
+ vespalib::string binary = module_build_path + "src/apps/tensor_conformance/vespa-tensor-conformance";
EXPECT_EQUAL(system(make_string("%s generate > conformance_test_spec.json", binary.c_str()).c_str()), 0);
EXPECT_EQUAL(system(make_string("diff -u %s conformance_test_spec.json", spec.c_str()).c_str()), 0);
}
TEST("require that cross-language tensor conformance tests pass with production C++ expression evaluation") {
- vespalib::string spec = module_path + "src/apps/tensor_conformance/test_spec.json";
- vespalib::string binary = module_path + "src/apps/tensor_conformance/vespa-tensor-conformance";
+ vespalib::string spec = module_src_path + "src/apps/tensor_conformance/test_spec.json";
+ vespalib::string binary = module_build_path + "src/apps/tensor_conformance/vespa-tensor-conformance";
EXPECT_EQUAL(system(make_string("cat %s | %s evaluate | %s verify", spec.c_str(), binary.c_str(), binary.c_str()).c_str()), 0);
}
