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