51 //FILE *fp_std_log=NULL; |
48 //FILE *fp_std_log=NULL; |
52 #if EMULATOR |
49 #if EMULATOR |
53 static GET_GLOBAL_VAR_FROM_TLS(fp_std_log,std_log_result,FILE *) |
50 static GET_GLOBAL_VAR_FROM_TLS(fp_std_log,std_log_result,FILE *) |
54 #define fp_std_log (*GET_GSTREAMER_WSD_VAR_NAME(fp_std_log,std_log_result,g)()) |
51 #define fp_std_log (*GET_GSTREAMER_WSD_VAR_NAME(fp_std_log,std_log_result,g)()) |
55 #else |
52 #else |
56 IMPORT_C extern FILE *fp_std_log; |
53 extern FILE *fp_std_log; |
57 #endif |
54 #endif |
58 |
55 |
59 //int assert_failed = 0; |
56 //int assert_failed = 0; |
60 #if EMULATOR |
57 #if EMULATOR |
61 static GET_GLOBAL_VAR_FROM_TLS(assert_failed,std_log_result,int) |
58 static GET_GLOBAL_VAR_FROM_TLS(assert_failed,std_log_result,int) |
62 #define assert_failed (*GET_GSTREAMER_WSD_VAR_NAME(assert_failed,std_log_result,g)()) |
59 #define assert_failed (*GET_GSTREAMER_WSD_VAR_NAME(assert_failed,std_log_result,g)()) |
63 #else |
60 #else |
64 IMPORT_C extern int assert_failed; |
61 extern int assert_failed; |
65 #endif |
62 #endif |
66 |
63 |
67 #if EMULATOR |
64 #if EMULATOR |
68 static GET_GLOBAL_VAR_FROM_TLS(xmlfile,std_log_result,char*) |
65 static GET_GLOBAL_VAR_FROM_TLS(xmlfile,std_log_result,char*) |
69 #define xmlfile (*GET_GSTREAMER_WSD_VAR_NAME(xmlfile,std_log_result,g)()) |
66 #define xmlfile (*GET_GSTREAMER_WSD_VAR_NAME(xmlfile,std_log_result,g)()) |
70 #else |
67 #else |
71 IMPORT_C extern char* xmlfile; |
68 extern char* xmlfile; |
72 #endif |
69 #endif |
73 |
70 |
74 #ifdef __SYMBIAN32__ |
71 #ifdef __SYMBIAN32__ |
75 EXPORT_C |
72 EXPORT_C |
76 #endif |
73 #endif |
77 int gnutest = 1; |
74 int gnutest = 1; |
78 |
75 |
79 # define VERIFY(fn) gnutest &= (fn) |
76 # define VERIFY(fn) gnutest &= (fn) |
80 |
77 |
81 #ifdef __SYMBIAN32__ |
78 #ifdef __SYMBIAN32__ |
82 IMPORT_C |
|
83 #endif |
|
84 void std_log(const char *filename,const int lineno,const char* aformat,...); |
|
85 |
|
86 #ifdef __SYMBIAN32__ |
|
87 EXPORT_C |
79 EXPORT_C |
88 #endif |
80 #endif |
89 void std_log(const char *filename,const int lineno,const char* aformat,...) |
81 void std_log(const char *filename,const int lineno,const char* aformat,...) |
90 { |
82 { |
91 /* commented for helium setup memory issue , error value -4*/ |
83 va_list va; |
92 // va_list va; |
84 if(fp_std_log==NULL) |
93 // if(fp_std_log==NULL) |
85 { |
94 // { |
86 fp_std_log = fopen(LOG_FILE,"a"); |
95 // fp_std_log = fopen(LOG_FILE,"a"); |
87 } |
96 // } |
88 |
97 // |
89 va_start(va,aformat); |
98 // va_start(va,aformat); |
90 { |
99 // { |
91 fprintf(fp_std_log,"%s - [%d] : ",filename,lineno); |
100 // fprintf(fp_std_log,"%s - [%d] : ",filename,lineno); |
92 vfprintf(fp_std_log,aformat,va); |
101 // vfprintf(fp_std_log,aformat,va); |
93 fprintf(fp_std_log,"\n"); |
102 // fprintf(fp_std_log,"\n"); |
94 fflush(fp_std_log); |
103 // fflush(fp_std_log); |
95 } |
104 // } |
96 va_end(va); |
105 // va_end(va); |
97 } |
106 } |
|
107 #ifdef __SYMBIAN32__ |
|
108 IMPORT_C |
|
109 #endif |
|
110 void init_log_file(); |
|
111 |
98 |
112 #ifdef __SYMBIAN32__ |
99 #ifdef __SYMBIAN32__ |
113 EXPORT_C |
100 EXPORT_C |
114 #endif |
101 #endif |
115 void init_log_file() |
102 void init_log_file() |
119 fp_std_log = fopen(LOG_FILE, "a"); |
106 fp_std_log = fopen(LOG_FILE, "a"); |
120 } |
107 } |
121 } |
108 } |
122 |
109 |
123 #ifdef __SYMBIAN32__ |
110 #ifdef __SYMBIAN32__ |
124 IMPORT_C |
|
125 #endif |
|
126 void close_log_file(); |
|
127 |
|
128 #ifdef __SYMBIAN32__ |
|
129 EXPORT_C |
111 EXPORT_C |
130 #endif |
112 #endif |
131 void close_log_file() |
113 void close_log_file() |
132 { |
114 { |
133 /* commented for helium setup memory issue , error value -4*/ |
115 fclose(fp_std_log); |
134 // fclose(fp_std_log); |
116 fp_std_log = NULL; |
135 // fp_std_log = NULL; |
|
136 } |
117 } |
137 |
118 |
138 // This function is used to generate the xml file used bt ATS |
119 // This function is used to generate the xml file used bt ATS |
139 |
120 #ifdef __SYMBIAN32__ |
140 #ifdef __SYMBIAN32__ |
121 EXPORT_C |
141 IMPORT_C |
122 #endif |
142 #endif |
|
143 |
|
144 void testResultXml(char *filename); |
|
145 |
|
146 #ifdef __SYMBIAN32__ |
|
147 EXPORT_C |
|
148 #endif |
|
149 |
|
150 void testResultXml(char *filename) |
123 void testResultXml(char *filename) |
151 { |
124 { |
152 |
125 char time_buf[50]; |
153 /* commented for helium setup memory issue , error value -4*/ |
|
154 /*char time_buf[50]; |
|
155 |
126 |
156 char result[10]; |
127 char result[10]; |
157 |
128 |
158 char xmlfilename[256]; |
129 char xmlfilename[256]; |
159 |
130 |