Rev 4227 | Rev 4252 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4227 | Rev 4229 | ||
---|---|---|---|
Line 1133... | Line 1133... | ||
1133 | int cmd_bench(cmd_arg_t *argv) |
1133 | int cmd_bench(cmd_arg_t *argv) |
1134 | { |
1134 | { |
1135 | test_t *test; |
1135 | test_t *test; |
1136 | uint32_t cnt = argv[1].intval; |
1136 | uint32_t cnt = argv[1].intval; |
1137 | 1137 | ||
- | 1138 | if (str_cmp((char *) argv->buffer, "*") == 0) { |
|
- | 1139 | for (test = tests; test->name != NULL; test++) { |
|
- | 1140 | if (test->safe) { |
|
- | 1141 | if (!run_bench(test, cnt)) |
|
- | 1142 | break; |
|
- | 1143 | } |
|
- | 1144 | } |
|
- | 1145 | } else { |
|
1138 | bool fnd = false; |
1146 | bool fnd = false; |
1139 | 1147 | ||
1140 | for (test = tests; test->name != NULL; test++) { |
1148 | for (test = tests; test->name != NULL; test++) { |
1141 | if (str_cmp(test->name, (char *) argv->buffer) == 0) { |
1149 | if (str_cmp(test->name, (char *) argv->buffer) == 0) { |
1142 | fnd = true; |
1150 | fnd = true; |
Line 1150... | Line 1158... | ||
1150 | } |
1158 | } |
1151 | } |
1159 | } |
1152 | 1160 | ||
1153 | if (!fnd) |
1161 | if (!fnd) |
1154 | printf("Unknown test\n"); |
1162 | printf("Unknown test\n"); |
- | 1163 | } |
|
1155 | 1164 | ||
1156 | return 1; |
1165 | return 1; |
1157 | } |
1166 | } |
1158 | 1167 | ||
1159 | #endif |
1168 | #endif |