Merge "Don't use StringPrintf() in gtest runner."
This commit is contained in:
commit
514f46b74c
@ -236,8 +236,6 @@ libBionicGtestMain_cflags := $(test_cflags)
|
||||
|
||||
libBionicGtestMain_cppflags := $(test_cppflags)
|
||||
|
||||
libBionicGtestMain_static_libraries := libbase
|
||||
|
||||
module := libBionicGtestMain
|
||||
module_tag := optional
|
||||
build_type := target
|
||||
@ -262,8 +260,6 @@ libBionicCtsGtestMain_cflags := $(test_cflags)
|
||||
|
||||
libBionicCtsGtestMain_cppflags := $(test_cppflags) -DUSING_GTEST_OUTPUT_FORMAT \
|
||||
|
||||
libBionicCtsGtestMain_static_libraries := libbase
|
||||
|
||||
module := libBionicCtsGtestMain
|
||||
module_tag := optional
|
||||
build_type := target
|
||||
|
@ -34,8 +34,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <base/stringprintf.h>
|
||||
|
||||
#ifndef TEMP_FAILURE_RETRY
|
||||
|
||||
/* Used to retry syscalls that can return EINTR. */
|
||||
@ -778,10 +776,10 @@ static void CollectChildTestResult(const ChildProcInfo& child_proc, TestCase& te
|
||||
int exitcode = WEXITSTATUS(child_proc.exit_status);
|
||||
testcase.SetTestResult(test_id, exitcode == 0 ? TEST_SUCCESS : TEST_FAILED);
|
||||
if (exitcode != 0) {
|
||||
std::string s = android::base::StringPrintf("%s exited with exitcode %d.\n",
|
||||
testcase.GetTestName(test_id).c_str(),
|
||||
exitcode);
|
||||
testcase.GetTest(test_id).AppendTestOutput(s);
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf), "%s exited with exitcode %d.\n",
|
||||
testcase.GetTestName(test_id).c_str(), exitcode);
|
||||
testcase.GetTest(test_id).AppendTestOutput(buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user