Skip to content

test/test looks for bedrock in the PATH #1618

@tangentsoft

Description

@tangentsoft

After building the server program for the first time, bedrock is in the top-level source directory but not yet installed. If you then say test/test, you get this error:

Starting bedrock failed. Errno: 2, msg: No such file or directory, serverName: bedrock bedrock -cacheSize 1000 -commandPortPrivate 0.0.0.0:10003 -controlPort localhost:10002 -db /tmp/bedrocktest_RdhqPz.db -enableMultiWrite true -escalateOverHTTP true -extraExceptionLogging -maxJournalSize 25000 -mmapSizeGB 1 -nodeHost localhost:10001 -nodeName bedrock_test -parallelReplication true -plugins Jobs,DB -priority 200 -serverHost 127.0.0.1:10000 -testName CancelJob -v -workerThreads 8

This is because it is defaulting to "bedrock", which doesn't exist in the PATH, as consulted by execvp() in test/lib/BedrockTester.cpp.

Since testing the binary before installing it is a good plan, I suggest applying this trivial patch:

diff --git a/test/lib/BedrockTester.cpp b/test/lib/BedrockTester.cpp
index fe74c833..fff22a46 100644
--- a/test/lib/BedrockTester.cpp
+++ b/test/lib/BedrockTester.cpp
@@ -58,7 +58,7 @@ BedrockTester::BedrockTester(const map<string, string>& args,
     }
 
     if (bedrockBinary.empty()) {
-        serverName = "bedrock";
+        serverName = "./bedrock";
     } else {
         serverName = bedrockBinary;
     }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions