Lines Matching refs:argv
242 static int GetTestsuitesToolsName(const char *argv[])
244 const char *testBin = static_cast<const char *>(argv[0]);
258 static int ParseTestCaseAndParam(int argc, const char *argv[], int *index)
278 testCase->caseLen = strlen(argv[*index]);
279 if (memcpy_s(testCase->bin, TEST_PATH_MAX, argv[*index], testCase->caseLen + 1) != EOK) {
286 for (j = 1; (j < TEST_PARAM_NUM) && (*index < argc) && (strncmp("-t", argv[*index], TEST_T_PARAM_LEN) != 0); j++) {
287 testCase->param[j] = (char *)argv[*index];
291 if (((*index) < argc) && (strncmp("-t", argv[*index], TEST_T_PARAM_LEN) == 0)) {
297 static int TestsuitesParamCheck(int argc, const char *argv[])
303 ret = TestsuitesDirFormat((char *)argv[1], strlen(argv[1]));
309 if (strcmp("-m", argv[i]) == 0) {
315 if (strcmp("smoke", argv[i]) == 0) {
317 } else if (strcmp("full", argv[i]) == 0) {
322 } else if (strcmp("-t", argv[i]) == 0) {
324 ret = ParseTestCaseAndParam(argc, argv, &i);
328 } else if (strcmp("-r", argv[i]) == 0) {
333 g_param.repeat = atoi(argv[i]);
414 int main(int argc, const char *argv[])
419 if ((argc < 2) || (argv == nullptr)) { /* 2: param index */
420 cout << argv[0] << ": " << strerror(EINVAL) << endl;
424 if ((strcmp("--h", argv[1]) == 0) || (strcmp("--help", argv[1]) == 0)) {
431 ret = GetTestsuitesToolsName(argv);
436 ret = TestsuitesParamCheck(argc, argv);