|
0
|
1 //========================================================================== |
|
|
2 // |
|
|
3 // tcdiag.cxx |
|
|
4 // |
|
|
5 // Kernel diag test harness. |
|
|
6 // |
|
|
7 //========================================================================== |
|
|
8 //####COPYRIGHTBEGIN#### |
|
|
9 // |
|
|
10 // ------------------------------------------- |
|
|
11 // The contents of this file are subject to the Cygnus eCos Public License |
|
|
12 // Version 1.0 (the "License"); you may not use this file except in |
|
|
13 // compliance with the License. You may obtain a copy of the License at |
|
|
14 // http://sourceware.cygnus.com/ecos |
|
|
15 // |
|
|
16 // Software distributed under the License is distributed on an "AS IS" |
|
|
17 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
|
18 // License for the specific language governing rights and limitations under |
|
|
19 // the License. |
|
|
20 // |
|
|
21 // The Original Code is eCos - Embedded Cygnus Operating System, released |
|
|
22 // September 30, 1998. |
|
|
23 // |
|
|
24 // The Initial Developer of the Original Code is Cygnus. Portions created |
|
2
|
25 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved. |
|
0
|
26 // ------------------------------------------- |
|
|
27 // |
|
|
28 //####COPYRIGHTEND#### |
|
|
29 //========================================================================== |
|
|
30 //#####DESCRIPTIONBEGIN#### |
|
|
31 // |
|
|
32 // Author(s): dsm |
|
|
33 // Contributors: dsm |
|
|
34 // Date: 1998-03-17 |
|
|
35 // Description: Test harness implementation that uses the kernel's |
|
|
36 // diag channel. This is intended for manual testing |
|
|
37 // of the kernel. |
|
|
38 //####DESCRIPTIONEND#### |
|
|
39 |
|
|
40 #include <testcase.h> |
|
|
41 #include <diag.h> |
|
|
42 |
|
2
|
43 bool cyg_test_is_simulator=false; // infrastructure changes as necessary |
|
|
44 |
|
0
|
45 void cyg_test_init() |
|
|
46 { |
|
|
47 diag_init(); |
|
|
48 } |
|
|
49 |
|
|
50 void cyg_test_output(int status, char *msg, int line, char *file) |
|
|
51 { |
|
|
52 char *st; |
|
|
53 |
|
|
54 switch (status) { |
|
|
55 case 0: |
|
|
56 st = "FAIL:"; |
|
|
57 break; |
|
|
58 case 1: |
|
|
59 st = "PASS:"; |
|
|
60 break; |
|
|
61 case 2: |
|
|
62 st = "EXIT:"; |
|
|
63 break; |
|
|
64 case 3: |
|
|
65 st = "INFO:"; |
|
|
66 break; |
|
|
67 } |
|
|
68 |
|
|
69 diag_write_string(st); |
|
|
70 diag_write_char('<'); |
|
|
71 diag_write_string(msg); |
|
|
72 diag_write_string("> Line: "); |
|
|
73 diag_write_dec(line); |
|
|
74 diag_write_string(", File: "); |
|
|
75 diag_write_string(file); |
|
|
76 diag_write_char('\n'); |
|
|
77 |
|
|
78 } |
|
|
79 |
|
|
80 // This is an appropriate function to set a breakpoint on |
|
|
81 void cyg_test_exit() |
|
|
82 { |
|
|
83 for(;;) |
|
|
84 ; |
|
|
85 } |
|
|
86 // EOF tcdiag.cxx |