Beispiel #1
0
void init_quick_tests(int argc, char *argv[])
{
	int trace=0;
	int new_option;
	//int x=0;	
	do{
		new_option=getopt_long(argc,argv,short_options,long_options,NULL);		
		if (new_option=='h'){
			printf("help\n");
			printf("-h will print the commands available\n");
			printf("-c will continue after a test fails else the program will exit\n");
			printf("-v will print all messages\n");
			printf("-q quiet mode only the number of tests passed and failed will be printed\n");
			printf("-t [number] set yaffs_trace to number\n");
			printf("-n [number] sets the number of random loops to run after the the test has run\n");
			exit(0);
		} else if (new_option=='c') {
			set_exit_on_error(0);
		} else if (new_option=='q') {
			set_print_level(-3);
		} else if (new_option=='t') {
			trace = atoi(optarg);
		}  else if (new_option=='v') {
			set_print_level(5);
		} else if (new_option=='n') {
			number_of_random_tests=atoi(optarg);
		}

	}while (new_option!=-1);
	yaffs_start_up();
	yaffs_set_trace(trace);

}
Beispiel #2
0
//! Default constructor
scenario::scenario() {
  appname_ = "scenario: ";
  set_print_level(mybhep::NORMAL);
  set_probmin(10.);
  // sequences_.clear();
  helix_chi2_ = mybhep::small_neg;
  tangent_chi2_ = mybhep::small_neg;
  ndof_ = mybhep::default_integer;
  n_free_families_ = mybhep::default_integer;
  n_overlaps_ = mybhep::default_integer;
}
Beispiel #3
0
//! constructor
scenario::scenario(const std::vector<sequence> &seqs, mybhep::prlevel /* level */, double probmin) {
  appname_ = "scenario: ";
  set_print_level(mybhep::NORMAL);
  set_probmin(probmin);
  sequences_ = seqs;
  helix_chi2_ = mybhep::small_neg;
  tangent_chi2_ = mybhep::small_neg;
  ndof_ = mybhep::default_integer;
  n_free_families_ = mybhep::default_integer;
  n_overlaps_ = mybhep::default_integer;
}
Beispiel #4
0
int main(int argc, char *argv[])
{
	procname = malloc(256);
	strncpy(procname, argv[1], 256);

	set_print_level(0);
	printf("%s started\n", procname);

	if (init_memshare(procname,SHMEMSIZE , QUEUESIZE)) {
		printf("Failed to init memshare\n");
		exit(1);
	}
	data_register(data_callback);
	signal1_register(signal1_callback);
	signal2_register(signal2_callback);
	signal3_register(signal3_callback);

	while (1)
		sleep(3);
}