Subversion Repositories HelenOS

Rev

Rev 3022 | Rev 4296 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3022 Rev 4055
Line 54... Line 54...
54
#include "ipc/send_async.def"
54
#include "ipc/send_async.def"
55
#include "ipc/send_sync.def"
55
#include "ipc/send_sync.def"
56
#include "ipc/answer.def"
56
#include "ipc/answer.def"
57
#include "ipc/hangup.def"
57
#include "ipc/hangup.def"
58
#include "devmap/devmap1.def"
58
#include "devmap/devmap1.def"
-
 
59
#include "loop/loop1.def"
59
#include "vfs/vfs1.def"
60
#include "vfs/vfs1.def"
-
 
61
#include "console/console1.def"
-
 
62
#include "stdio/stdio1.def"
-
 
63
#include "stdio/stdio2.def"
60
    {NULL, NULL, NULL}
64
    {NULL, NULL, NULL}
61
};
65
};
62
 
66
 
63
static bool run_test(test_t *test)
67
static bool run_test(test_t *test)
64
{
68
{
Line 105... Line 109...
105
        printf("%c\t%s\t\t%s%s\n", c, test->name, test->desc, (test->safe ? "" : " (unsafe)"));
109
        printf("%c\t%s\t\t%s%s\n", c, test->name, test->desc, (test->safe ? "" : " (unsafe)"));
106
   
110
   
107
    printf("*\t\t\tRun all safe tests\n");
111
    printf("*\t\t\tRun all safe tests\n");
108
}
112
}
109
 
113
 
110
int main(void)
114
int main(int argc, char **argv)
111
{
115
{
-
 
116
    printf("Number of arguments: %d\n", argc);
-
 
117
    if (argv) {
-
 
118
        printf("Arguments:");
-
 
119
        while (*argv) {
-
 
120
            printf(" '%s'", *argv++);
-
 
121
        }
-
 
122
        printf("\n");
-
 
123
    }
-
 
124
 
112
    while (1) {
125
    while (1) {
113
        char c;
126
        char c;
114
        test_t *test;
127
        test_t *test;
115
       
128
       
116
        list_tests();
129
        list_tests();
Line 122... Line 135...
122
        if ((c >= 'a') && (c <= 'z')) {
135
        if ((c >= 'a') && (c <= 'z')) {
123
            for (test = tests; test->name != NULL; test++, c--)
136
            for (test = tests; test->name != NULL; test++, c--)
124
                if (c == 'a')
137
                if (c == 'a')
125
                    break;
138
                    break;
126
           
139
           
127
            if (c > 'a')
140
            if (test->name == NULL)
128
                printf("Unknown test\n\n");
141
                printf("Unknown test\n\n");
129
            else
142
            else
130
                run_test(test);
143
                run_test(test);
131
        } else if (c == '*')
144
        } else if (c == '*') {
132
            run_safe_tests();
145
            run_safe_tests();
-
 
146
        } else if (c < 0) {
-
 
147
            /* got EOF */
-
 
148
            break;
133
        else
149
        } else {
134
            printf("Invalid test\n\n");
150
            printf("Invalid test\n\n");
-
 
151
        }
-
 
152
           
135
    }
153
    }
-
 
154
 
-
 
155
    return 0;
136
}
156
}
137
 
157
 
138
/** @}
158
/** @}
139
 */
159
 */