projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Remove BEGIN/END
[m6w6/libmemcached]
/
libtest
/
main.cc
diff --git
a/libtest/main.cc
b/libtest/main.cc
index 03a40fc8aeea4d6b39540845c01189d05728f91b..d6c4ecbfa59e82c25cbda5802905c291c0632826 100644
(file)
--- a/
libtest/main.cc
+++ b/
libtest/main.cc
@@
-220,22
+220,22
@@
int main(int argc, char *argv[])
is_massive(opt_massive);
}
is_massive(opt_massive);
}
- char
buffer
[1024];
+ char
tmp_directory
[1024];
if (getenv("LIBTEST_TMP"))
{
if (getenv("LIBTEST_TMP"))
{
- snprintf(
buffer, sizeof(buffer
), "%s", getenv("LIBTEST_TMP"));
+ snprintf(
tmp_directory, sizeof(tmp_directory
), "%s", getenv("LIBTEST_TMP"));
}
else
{
}
else
{
- snprintf(
buffer, sizeof(buffer
), "%s", LIBTEST_TEMP);
+ snprintf(
tmp_directory, sizeof(tmp_directory
), "%s", LIBTEST_TEMP);
}
}
- if (chdir(
buffer
) == -1)
+ if (chdir(
tmp_directory
) == -1)
{
char getcwd_buffer[1024];
char *dir= getcwd(getcwd_buffer, sizeof(getcwd_buffer));
{
char getcwd_buffer[1024];
char *dir= getcwd(getcwd_buffer, sizeof(getcwd_buffer));
- Error << "Unable to chdir() from " << dir << " to " <<
buffer
<< " errno:" << strerror(errno);
+ Error << "Unable to chdir() from " << dir << " to " <<
tmp_directory
<< " errno:" << strerror(errno);
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
@@
-292,7
+292,7
@@
int main(int argc, char *argv[])
return EXIT_SKIP;
case TEST_FAILURE:
return EXIT_SKIP;
case TEST_FAILURE:
- std::cerr << "frame->create()" << std::endl;
+ std::cerr <<
__FILE__ << ":" << __LINE__ << ": " <<
"frame->create()" << std::endl;
return EXIT_FAILURE;
}
}
return EXIT_FAILURE;
}
}
@@
-329,10
+329,7
@@
int main(int argc, char *argv[])
std::ofstream xml_file;
std::string file_name;
std::ofstream xml_file;
std::string file_name;
- if (getenv("LIBTEST_TEMP"))
- {
- file_name.append(getenv("LIBTEST_TEMP"));
- }
+ file_name.append(tmp_directory);
file_name.append(frame->name());
file_name.append(".xml");
xml_file.open(file_name.c_str(), std::ios::trunc);
file_name.append(frame->name());
file_name.append(".xml");
xml_file.open(file_name.c_str(), std::ios::trunc);
@@
-343,32
+340,27
@@
int main(int argc, char *argv[])
}
catch (libtest::fatal& e)
{
}
catch (libtest::fatal& e)
{
- std::cerr << "FATAL:" << e.what() << std::endl;
- exit_code= EXIT_FAILURE;
- }
- catch (libtest::start& e)
- {
- std::cerr << "Failure to start:" << e.what() << std::endl;
+ std::cerr << __FILE__ << ":" << __LINE__ << ": " << "FATAL:" << e.what() << std::endl;
exit_code= EXIT_FAILURE;
}
catch (libtest::disconnected& e)
{
exit_code= EXIT_FAILURE;
}
catch (libtest::disconnected& e)
{
- std::cerr << "Unhandled disconnection occurred:" << e.what() << std::endl;
+ std::cerr <<
__FILE__ << ":" << __LINE__ << ": " <<
"Unhandled disconnection occurred:" << e.what() << std::endl;
exit_code= EXIT_FAILURE;
}
catch (std::exception& e)
{
exit_code= EXIT_FAILURE;
}
catch (std::exception& e)
{
- std::cerr << "std::exception:" << e.what() << std::endl;
+ std::cerr <<
__FILE__ << ":" << __LINE__ << ": " <<
"std::exception:" << e.what() << std::endl;
exit_code= EXIT_FAILURE;
}
catch (char const*)
{
exit_code= EXIT_FAILURE;
}
catch (char const*)
{
- std::cerr << "Exception:" << std::endl;
+ std::cerr <<
__FILE__ << ":" << __LINE__ << ": " <<
"Exception:" << std::endl;
exit_code= EXIT_FAILURE;
}
catch (...)
{
exit_code= EXIT_FAILURE;
}
catch (...)
{
- std::cerr << "Unknown exception halted execution." << std::endl;
+ std::cerr <<
__FILE__ << ":" << __LINE__ << ": " <<
"Unknown exception halted execution." << std::endl;
exit_code= EXIT_FAILURE;
}
exit_code= EXIT_FAILURE;
}