Example #1
0
int run_memory_tests(int argc, char **argv)
{
	if (argc < 3)
	{
	        printf("Usage: mem -test <test> <strategy> \n");
		return 0;
	}
	set_testrunner_default_timeout(20);
	/* Tests can be invoked by matching their name or their suite name or 'all'*/
	testentry_t tests[] = {
		{"alloc1","suite1",test_alloc_1},
		{"alloc2","suite2",test_alloc_2},
		{"alloc3","suite1",test_alloc_3},
		{"alloc4","suite2",test_alloc_4},
		{"stress","suite3",do_stress_tests},
	};

 	return run_testrunner(argc,argv,tests,sizeof(tests)/sizeof(testentry_t));
}
Example #2
0
/*
 * Main entry point for SMP2 test harness
 */
int run_smp2_tests(int argc, char **argv)
{
	/* Tests can be invoked by matching their name or their suite name 
	   or 'all' */
	testentry_t tests[]={
	{ "make" , "make", test_make_enzyme_threads },
	{ "sort" , "enzyme", test_sort },
	{ "pleasequit1" , "enzyme", test_pleasequit1 },
	{ "pleasequit0" , "enzyme", test_pleasequit0 },
	{ "swap1" , "enzyme", test_swap_count_workperformed1 },
	{ "swap2" , "enzyme", test_swap_count_workperformed2 },
	{ "swap3" , "enzyme", test_swap_count_workperformed3 },
	{ "run_enzyme" , "enzyme", test_run_enzyme },
	{ "join" , "join", test_join },
	{ "cancel" , "join", test_cancelenzyme }

	};
	int result = run_testrunner(argc, argv, tests, sizeof(tests) / sizeof (testentry_t));
	unlink("smp2.in");
	unlink("smp2.out");
	unlink("smp2.err");
	return result;
}