19 if (
flag.size() == 0) {
26 if (
flag.size() > 1) {
27 SK_ABORT(
"Flag %s takes one single value, got: %d.\n",
name.c_str(),
flag.size());
32 if (
flag.size() % 2 == 1) {
34 "Flag %s takes an even number of arguments, got: %d.\n",
name.c_str(),
flag.size());
46 unsigned int numFlagsSet = 0;
57 if (numFlagsSet !=
flags.size() && numFlagsSet != 0) {
58 SK_ABORT(
"Either all or none of the following flags must be set: %s.\n",
names.c_str());
64 unsigned int numFlagsSet = 0;
75 if (numFlagsSet != 1) {
76 SK_ABORT(
"Exactly one of the following flags must be set: %s.\n",
names.c_str());
80#if defined(SK_BUILD_FOR_ANDROID)
85extern bool gSkDebugToStdOut;
89#if defined(SK_BUILD_FOR_ANDROID)
95 gSkDebugToStdOut =
true;
102 std::ostringstream oss;
103 for (
int i = 1;
i < argc;
i++) {
109 TestRunner::Log(
"Test runner invoked with arguments: %s", oss.str().c_str());
116 for (
int i = 0;
i < skipFlag.
size();
i++) {
118 if (std::regex_search(
name, re)) {
127 for (
int i = 0;
i < matchFlag.
size();
i++) {
129 if (std::regex_search(
name, re)) {
139 std::tm* now = std::gmtime(&t);
140 std::ostringstream oss;
141 oss << std::put_time(now,
"%Y-%m-%d %H:%M:%S UTC");
142 printf(
"[%s] ", oss.str().c_str());
#define SK_ABORT(message,...)
FlutterSemanticsFlag flag
FlutterSemanticsFlag flags
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint32_t uint32_t * format
static float min(float r, float g, float b)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
void StringEven(std::string name, CommandLineFlags::StringArray flag)
void IntGreaterOrEqual(std::string name, int flag, int min)
void ExactlyOne(std::map< std::string, bool > flags)
void AllOrNone(std::map< std::string, bool > flags)
void StringNonEmpty(std::string name, CommandLineFlags::StringArray flag)
void StringAtMostOne(std::string name, CommandLineFlags::StringArray flag)
bool ShouldRunTestCase(const char *name, CommandLineFlags::StringArray &matchFlag, CommandLineFlags::StringArray &skipFlag)
void Log(const char *format,...) SK_PRINTF_LIKE(1
void InitAndLogCmdlineArgs(int argc, char **argv)
static const char *const names[]
DEF_SWITCHES_START aot vmservice shared library name
static double time(int loops, Benchmark *bench, Target *target)