Go to the source code of this file.
RESULT test_jit_compile |
( |
const char * |
file_name) | |
|
|
static |
- Parameters
-
file_name | name of the test file |
- Returns
RESULT
code (see error.h)
Exewcute in memory test of the compiler.
Definition at line 51 of file process_file.c.
55 FILE * input_file =
NULL;
58 input_file = fopen(file_name,
"rb");
64 memset(&test_info, 0,
sizeof(test_info));
79 LOG_ERROR(
"Error extracting expected results");
96 LOG_ERROR(
"Error checking results from test");
RESULT test_compile_exec |
( |
const char * |
file_name) | |
|
|
static |
- Parameters
-
file_name | name of the test file |
- Returns
RESULT
code (see error.h)
Call the compiler to produce executable file and then test it's execution.
Definition at line 134 of file process_file.c.
139 FILE * input_file =
NULL;
142 input_file = fopen(file_name,
"rb");
148 memset(&test_info, 0,
sizeof(test_info));
162 LOG_ERROR(
"Error extracting expected results");
186 LOG_ERROR(
"Error checking results from test");
RESULT build_test_case |
( |
const char * |
file_name) | |
|
|
static |
- Parameters
-
file_name | name of the test file |
- Returns
RESULT
code (see error.h)
Calls the compiler to run inmemory compilation and execution of thest case. Write down the results into the test case file.
Definition at line 223 of file process_file.c.
228 memset(&test_info, 0,
sizeof(test_info));
242 LOG_ERROR(
"Error importing results from test");
RESULT process_one_file |
( |
const char * |
file_name) | |
|
|
static |
- Parameters
-
file_name | name of the test file |
- Returns
RESULT
code (see error.h)
Depending on command line arguments specifying tester mode call function to perform diferent test procedures on the file
Definition at line 271 of file process_file.c.
274 char file_buffer[1024] =
"";
282 strcpy(file_buffer,
".");
285 #if defined (_MSC_VER)
286 if (file_buffer[strlen(file_buffer) -1] !=
'\\')
288 strcat(file_buffer,
"\\");
290 #elif defined (__GNUC__)
291 if (file_buffer[strlen(file_buffer) -1] !=
'/')
293 strcat(file_buffer,
"/");
297 strcat(file_buffer, file_name);
337 LOG_ERROR(
"Error compiling and executing test");
- Returns
RESULT
code (see error.h)
Scan specified directory and for all test case files call process_one_file
function.
Definition at line 356 of file process_file.c.
359 #if defined (_MSC_VER)
360 struct _finddata_t info;
363 #elif defined (__GNUC__)
365 struct dirent * dirStruct = 0;
370 #if defined (_MSC_VER)
375 if (mask[strlen(mask)-1] !=
'\\')
387 handle = _findfirst(mask, &info);
396 }
while(_findnext(handle, &info) != -1);
400 #elif defined (__GNUC__)
408 dirPtr = opendir(
".");
416 while ((dirStruct = readdir(dirPtr)) != 0)
418 size_t len = strlen(dirStruct->d_name);