1*69606e3fSchristos# -*-perl-*- 2*69606e3fSchristos$description = "Test generic option processing.\n"; 3*69606e3fSchristos 4*69606e3fSchristosopen(MAKEFILE, "> $makefile"); 5*69606e3fSchristos 6*69606e3fSchristos# The Contents of the MAKEFILE ... 7*69606e3fSchristos 8*69606e3fSchristosprint MAKEFILE "foo 1foo: ; \@echo \$\@\n"; 9*69606e3fSchristos 10*69606e3fSchristosclose(MAKEFILE); 11*69606e3fSchristos 12*69606e3fSchristos# TEST 0 13*69606e3fSchristos 14*69606e3fSchristos&run_make_with_options($makefile, "-j 1foo", &get_logfile); 15*69606e3fSchristosif (!$parallel_jobs) { 16*69606e3fSchristos $answer = "$make_name: Parallel jobs (-j) are not supported on this platform.\n$make_name: Resetting to single job (-j1) mode.\n1foo\n"; 17*69606e3fSchristos} 18*69606e3fSchristoselse { 19*69606e3fSchristos $answer = "1foo\n"; 20*69606e3fSchristos} 21*69606e3fSchristos 22*69606e3fSchristos# TEST 1 23*69606e3fSchristos 24*69606e3fSchristos# This test prints the usage string; I don't really know a good way to 25*69606e3fSchristos# test it. I guess I could invoke make with a known-bad option to see 26*69606e3fSchristos# what the usage looks like, then compare it to what I get here... :( 27*69606e3fSchristos 28*69606e3fSchristos# If I were always on UNIX, I could invoke it with 2>/dev/null, then 29*69606e3fSchristos# just check the error code. 30*69606e3fSchristos 31*69606e3fSchristos&run_make_with_options($makefile, "-j1foo 2>/dev/null", &get_logfile, 512); 32*69606e3fSchristos$answer = ""; 33*69606e3fSchristos&compare_output($answer, &get_logfile(1)); 34*69606e3fSchristos 35*69606e3fSchristos1; 36