28 if (!fContextStack.empty()) {
30 for (
int i = 0;
i < fContextStack.size(); ++
i) {
34 fullMessage.
append(fContextStack[
i]);
45 if (strlen(this->condition) > 0) {
49 result.append(this->condition);
54 if (!FLAGS_tmpDir.isEmpty()) {
57#ifdef SK_BUILD_FOR_ANDROID
58 const char* environmentVariable =
"TMPDIR";
59 const char* defaultValue =
"/data/local/tmp";
60#elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX)
61 const char* environmentVariable =
"TMPDIR";
62 const char* defaultValue =
"/tmp";
63#elif defined(SK_BUILD_FOR_WIN)
64 const char* environmentVariable =
"TEMP";
65 const char* defaultValue =
nullptr;
67 const char* environmentVariable =
nullptr;
68 const char* defaultValue =
nullptr;
70 const char* tmpdir = environmentVariable ?
getenv(environmentVariable) :
nullptr;
71 return SkString(tmpdir ? tmpdir : defaultValue);
83 const double elapsedMs = this->elapsedMs();
85 return static_cast<SkMSec>(elapsedMs);
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
static constexpr SkMSec SK_MSecMax
static DEFINE_string2(tmpDir, t, nullptr, "Temp directory to use.")
void append(const char text[])
void reportFailedWithContext(const skiatest::Failure &)
virtual void bumpTestCount()
virtual bool verbose() const
virtual bool allowExtendedTest() const
SkMSec elapsedMsInt() const
SkString toString() const