projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs Adding new tests to direct/timothy_tests/quicktests/
[yaffs2.git]
/
direct
/
timothy_tests
/
quick_tests
/
quick_tests.c
diff --git
a/direct/timothy_tests/quick_tests/quick_tests.c
b/direct/timothy_tests/quick_tests/quick_tests.c
index a58fc0881dd23f78de4b5154a40c2c8abc85ecdf..79a7aae649b682f233e7e95502fe2c3f2df6d45b 100644
(file)
--- a/
direct/timothy_tests/quick_tests/quick_tests.c
+++ b/
direct/timothy_tests/quick_tests/quick_tests.c
@@
-33,19
+33,19
@@
int main(int argc, char *argv[]){
init_quick_tests(argc, argv);
print_message("\n\nrunning quick tests for yaffs\n\n", 0);
init_quick_tests(argc, argv);
print_message("\n\nrunning quick tests for yaffs\n\n", 0);
- //printf("testing yaffs\n");
- //printf("len function %d",(sizeof(test_list)/sizeof(test_template)));
for (x=0;x<total_number_of_tests;x++){
for (x=0;x<total_number_of_tests;x++){
- //printf("x %d\n",x);
- yaffs_set_error(0); /*reset the last error to 0 */
+ /* output=yaffs_open(FILE_PATH,O_CREAT | O_RDWR, FILE_MODE);
+ printf("yaffs_open %d \n",output);
+ printf("yaffs_close %d \n",yaffs_close(output));
+ */ yaffs_set_error(0); /*reset the last error to 0 */
sprintf(message,"\nrunning test: %s \n",test_list[x].name_of_test);
sprintf(message,"\nrunning test: %s \n",test_list[x].name_of_test);
- print_message(message,
2
);
+ print_message(message,
3
);
output=test_list[x].p_function(); /*run test*/
if (output>=0){
/*test has passed*/
sprintf(message,"\ttest %s passed\n",test_list[x].name_of_test);
output=test_list[x].p_function(); /*run test*/
if (output>=0){
/*test has passed*/
sprintf(message,"\ttest %s passed\n",test_list[x].name_of_test);
- print_message(message,
2
);
+ print_message(message,
3
);
num_of_tests_pass++;
} else {
/*test is assumed to have failed*/
num_of_tests_pass++;
} else {
/*test is assumed to have failed*/
@@
-77,7
+77,7
@@
int main(int argc, char *argv[]){
} else {
sprintf(message,"\ttest clean: %s passed\n",test_list[x].name_of_test);
} else {
sprintf(message,"\ttest clean: %s passed\n",test_list[x].name_of_test);
- print_message(message,
2
);
+ print_message(message,
3
);
}
}
/*this is where the loop should break to*/
}
}
/*this is where the loop should break to*/
@@
-89,9
+89,9
@@
void quit_quick_tests(int exit_code)
char message[30];
message[0]='\0';
if (num_of_tests_pass==total_number_of_tests && num_of_tests_failed==0){
char message[30];
message[0]='\0';
if (num_of_tests_pass==total_number_of_tests && num_of_tests_failed==0){
- printf("\t OK \n");
+ printf("\t OK
--all tests passed
\n");
}
}
- printf("
tests: %d passed %d failed out of %d tests\n\n\n",num_of_tests_pass,num_of_tests_failed,total_number_of_tests
);
+ printf("
out of %d tests, %d ran: %d passed and %d failed\n\n\n", total_number_of_tests,(num_of_tests_pass+num_of_tests_failed) ,num_of_tests_pass,num_of_tests_failed
);
yaffs_unmount(YAFFS_MOUNT_POINT);
exit(exit_code);
}
yaffs_unmount(YAFFS_MOUNT_POINT);
exit(exit_code);
}