fix various issues in curl bindings related to tile cancelation
This commit is contained in:
@@ -67,9 +67,14 @@ ServerEnvironment* env = nullptr;
|
||||
|
||||
GTEST_API_ int main(int argc, char *argv[]) {
|
||||
// Note: glibc's dirname() **modifies** the argument and can't handle static strings.
|
||||
std::string argv0 { argv[0] }; argv0 = dirname(const_cast<char *>(argv0.c_str()));
|
||||
std::string file { __FILE__ }; file = dirname(const_cast<char *>(file.c_str()));
|
||||
base_directory = argv0 + "/" + file + "/suite/";
|
||||
if (file[0] == '/') {
|
||||
// If __FILE__ is an absolute path, we don't have to guess from the argv 0.
|
||||
base_directory = file + "/suite/";
|
||||
} else {
|
||||
std::string argv0 { argv[0] }; argv0 = dirname(const_cast<char *>(argv0.c_str()));
|
||||
base_directory = argv0 + "/" + file + "/suite/";
|
||||
}
|
||||
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
env = new ServerEnvironment();
|
||||
|
||||
Reference in New Issue
Block a user