grub2: bring back build of aros-side grub2 tools
[AROS.git] / test / clib / all-tests.c
blob3d8ef8bfd2c3370de0963f60645cef985fe21a94
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <sys/stat.h>
9 #include "test.h"
11 char *tests[] =
13 "chdir",
14 "strchr",
15 "stpblk",
16 "strtok",
17 "tmpfile",
18 "ctype",
19 "sscanf",
20 "mnt_names",
21 "execl2",
22 "execl2_vfork",
23 "argv0_test1",
24 "argv0_test2",
25 "argv0_test3",
26 "argv0_test4",
28 NULL
31 int main()
33 int total = 0, failed = 0;
34 int i, rc;
35 char buffer[128];
37 mkdir( "T:TestOutput", 0777 );
39 for( i = 0; tests[i] != NULL; i++ )
41 total++;
42 sprintf( buffer, "%s >T:TestOutput/test-%d.log", tests[i], i );
44 rc = system( buffer );
46 if( rc == OK )
48 printf( "." );
49 fflush( stdout );
51 else
53 failed++;
54 printf( "F" );
55 fflush( stdout );
60 printf( "\n\nA total of %d tests run: %d succeeded, %d failed.\n",
61 total, total - failed, failed );
63 if( failed > 0 )
65 printf( "\nError messages:\n" );
66 system( "join T:TestOutput/test-#? as T:TestOutput/all-tests.log" );
67 system( "type T:TestOutput/all-tests.log" );
70 system( "delete T:TestOutput ALL QUIET" );
72 return 0;