Changeset 3f2177e in mainline


Ignore:
Timestamp:
2009-04-04T00:59:20Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f049eec
Parents:
a85aebd
Message:

add support for benchmarking of all tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/cmd.c

    ra85aebd r3f2177e  
    11361136        uint32_t cnt = argv[1].intval;
    11371137       
    1138         bool fnd = false;
    1139        
    1140         for (test = tests; test->name != NULL; test++) {
    1141                 if (str_cmp(test->name, (char *) argv->buffer) == 0) {
    1142                         fnd = true;
    1143                        
    1144                         if (test->safe)
    1145                                 run_bench(test, cnt);
    1146                         else
    1147                                 printf("Unsafe test\n");
    1148                        
    1149                         break;
     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                        }
    11501144                }
    1151         }
    1152                
    1153         if (!fnd)
    1154                 printf("Unknown test\n");
     1145        } else {
     1146                bool fnd = false;
     1147               
     1148                for (test = tests; test->name != NULL; test++) {
     1149                        if (str_cmp(test->name, (char *) argv->buffer) == 0) {
     1150                                fnd = true;
     1151                               
     1152                                if (test->safe)
     1153                                        run_bench(test, cnt);
     1154                                else
     1155                                        printf("Unsafe test\n");
     1156                               
     1157                                break;
     1158                        }
     1159                }
     1160               
     1161                if (!fnd)
     1162                        printf("Unknown test\n");
     1163        }
    11551164       
    11561165        return 1;
Note: See TracChangeset for help on using the changeset viewer.