Changeset 50661ab in mainline for kernel/generic/src/console/cmd.c
- Timestamp:
- 2006-12-11T19:00:04Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f272cb8
- Parents:
- 319e60e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
r319e60e r50661ab 841 841 } 842 842 843 #ifdef CONFIG_TEST 843 844 /** Command for printing kernel tests list. 844 845 * … … 852 853 853 854 for (test = tests; test->name != NULL; test++) 854 printf("%s\t%s\n", test->name, test->desc); 855 855 printf("%s\t\t%s%s\n", test->name, test->desc, (test->safe ? "" : " (unsafe)")); 856 857 printf("*\t\tRun all safe tests\n"); 856 858 return 1; 857 859 } … … 865 867 int cmd_test(cmd_arg_t *argv) 866 868 { 867 bool fnd = false;868 869 test_t *test; 869 870 870 for (test = tests; test->name != NULL; test++) { 871 if (strcmp(test->name, argv->buffer) == 0) { 872 fnd = true; 873 test->entry(); 874 break; 871 if (strcmp(argv->buffer, "*") == 0) { 872 for (test = tests; test->name != NULL; test++) { 873 if (test->safe) { 874 printf("\n%s\t\t%s\n\n", test->name, test->desc); 875 test->entry(); 876 } 875 877 } 876 } 877 878 if (!fnd) 879 printf("Unknown test.\n"); 880 881 return 1; 882 } 878 } else { 879 bool fnd = false; 880 881 for (test = tests; test->name != NULL; test++) { 882 if (strcmp(test->name, argv->buffer) == 0) { 883 fnd = true; 884 test->entry(); 885 break; 886 } 887 } 888 889 if (!fnd) 890 printf("Unknown test.\n"); 891 } 892 893 return 1; 894 } 895 #endif 883 896 884 897 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.