void CNsIRequest::OnStartTests(UINT nMenuID)
{
	if (nMenuID == ID_INTERFACES_NSIREQUEST_RUNALLTESTS)
		RunAllTests(9);
	else
		RunIndividualTests(nMenuID, 9);
}
Beispiel #2
0
int RecurseFunctions(char *c_files_name)
{
	struct dirent *function_entry;
	DIR *function_dir;
	char openbuffer[MAX_DIR_PATH];
		
	sprintf(openbuffer,"./%s/Functions",c_files_name);
	function_dir = opendir(openbuffer);
	if (!function_dir){
		fprintf(stderr,"cannot open directory '%s':", openbuffer);
		perror("opendir");
		exit(1);
	} 
	else if(chdir(openbuffer) == -1){
		fprintf(stderr,"cannot change directory '%s':", openbuffer);
		perror("chdir");
		exit(1);		
	}
	else {
		printf("******* c file %s() *******\n",c_files_name);

		while ((function_entry = readdir(function_dir))){
		  	if (function_entry->d_name[0] == '.'){
				continue;
			}			
			if (RunIndividualTests(function_entry->d_name)){
				return 1;
			}

		}
		if (closedir(function_dir) == -1){
			perror("closedir");
		}
		if(chdir("../../") == -1){
			fprintf(stderr,"cannot change directory '%s':", openbuffer);
			perror("chdir");
			exit(1);		
		}
	}
	return 0;
}