Date: Sun, 5 Sep 1999 15:46:31 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: "Paul D. Smith" cc: Esa A E Peuha , Laszlo Molnar , djgpp-workers AT delorie DOT com Subject: Re: Make 3.78 is in pretest (fwd) In-Reply-To: <14275.64667.739010.922179@baynetworks.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Here are some more changes to the Make test suite, as per the latest discussions. They should be applied on top of the diffs I sent earlier. (If these fail to apply cleanly, please tell me and I will send a complete set of diffs against the original make-test-3.77.93 distribution.) While running tests in different environments, I found something that looks like a bug: "echo" is not mentioned as the built-in shell command for the Unixy shell. The reason is that the original Unix code doesn't do that either (see sh_cmds[] array in job.c:construct_command_argv_internal). I suspect that this is a bug, at least in the MSDOS branch, but before I go ahead and add "echo", could you please tell why does the Unix version omits it? Also, some of the tests need a stand-alone `echo'. I would like to avoid telling people to install Sh-utils, but the solution depends on whether "echo" is introduced into built-in shell commands, so I will withhold the related diffs for now. *** run_make_tests.p~1 Thu Aug 19 20:18:30 1999 --- run_make_tests.pl Sat Sep 4 18:58:44 1999 *************** *** 195,200 **** --- 195,210 ---- ($pure_log = $ENV{PURIFYOPTIONS}) =~ s,.*-logfile=([^ ]+) .*,\1,; $pure_log =~ s/%v/$make_name/; $purify_errors = 0; + + $string = `sh -c "$make_path -j 2 -f /dev/null 2>&1"`; + if ($string =~ /not supported/) + { + $parallel_jobs = 0; + } + else + { + $parallel_jobs = 1; + } } sub setup_for_test *** test_driver.p~0 Fri Aug 13 07:42:02 1999 --- test_driver.pl Sat Sep 4 17:05:24 1999 *************** *** 23,30 **** $pnt = $ENV{"Path"}; $sr = $ENV{"SystemRoot"}; foreach $k (keys %ENV) { delete $ENV{$k}; } ! %ENV = ( "HOME", $h, "PATH", $p, "Path", $pnt, "SystemRoot", $sr); $ENV{"PURIFYOPTIONS"} = $u if $u; $| = 1; # unbuffered output --- 23,52 ---- $pnt = $ENV{"Path"}; $sr = $ENV{"SystemRoot"}; + # DJGPP-specific variables that are required for proper + # functioning of the DJGPP library and utilities + $djdir = $ENV{"DJDIR"}; + $djgpp = $ENV{"DJGPP"}; + $tmpd = $ENV{"TMPDIR"}; + $shell = $ENV{"SHELL"}; + $csp = $ENV{"COMSPEC"}; + $tz = $ENV{"TZ"}; + $host = $ENV{"HOSTNAME"}; + $lfn = $ENV{"LFN"}; + $fncase= $ENV{"FNCASE"}; + $e387 = $ENV{"387"}; + $emu387= $ENV{"EMU387"}; + $euser = $ENV{"USER"}; + $elogn = $ENV{"LOGNAME"}; + $egrp = $ENV{"GROUP"}; + foreach $k (keys %ENV) { delete $ENV{$k}; } ! # PATH is after Path to work around a bug in some DJGPP ports of Perl. ! %ENV = ( "Path", $pnt, "SystemRoot", $sr, "HOME", $h, "PATH", $p, ! "DJDIR", $djdir, "DJGPP", $djgpp, "TMPDIR", $tmpd, ! "SHELL", $shell, "COMSPEC", $csp, "TZ", $tz, "HOST", $host, ! "LFN", $lfn, "FNCASE", $fncase, "387", $e387, "EMU387", $emu387, ! "USER", $euser, "LOGNAME", $elogn, "GROUP", $egrp); $ENV{"PURIFYOPTIONS"} = $u if $u; $| = 1; # unbuffered output *************** *** 36,48 **** $keep = 0; # keep temp files around $workdir = "work"; # The directory where the test will start running $scriptdir = "scripts"; # The directory where we find the test scripts - $tmpfilesuffix = "tmp"; # the suffix used on tmpfiles $default_output_stack_level = 0; # used by attach_default_output, etc. $default_input_stack_level = 0; # used by attach_default_input, etc. $cwd = "."; # don't we wish we knew $cwdslash = ""; # $cwd . $pathsep, but "" rather than "./" ! &get_osname; # sets $osname, $vos, and $pathsep &set_defaults; # suite-defined --- 58,71 ---- $keep = 0; # keep temp files around $workdir = "work"; # The directory where the test will start running $scriptdir = "scripts"; # The directory where we find the test scripts $default_output_stack_level = 0; # used by attach_default_output, etc. $default_input_stack_level = 0; # used by attach_default_input, etc. $cwd = "."; # don't we wish we knew $cwdslash = ""; # $cwd . $pathsep, but "" rather than "./" ! &get_osname; # sets $osname, $vos, $pathsep, and $fancy_file_names ! ! $tmpfilesuffix = "t"; &set_defaults; # suite-defined *** scripts/features/parallelism.~0~ Mon Jul 19 23:16:22 1999 --- scripts/features/parallelism Sat Sep 4 16:40:48 1999 *************** *** 13,18 **** --- 13,23 ---- and third commands will appear before the first if indeed make is running all of these commands in parallel."; + if (!$parallel_jobs) { + print "(Parallel jobs not supported; skipping test.) "; + return 1; + } + if ($vos) { $delete_command = "delete_file -no_ask"; $sleep_command = "sleep -seconds"; *** scripts/features/recursion.~0~ Sun Apr 30 09:57:50 1995 --- scripts/features/recursion Sat Sep 4 16:23:08 1999 *************** *** 50,56 **** ."$make_name: Leaving directory `$pwd'\n"; } ! &run_make_with_options($makefile,"CFLAGS=-O -w -j 2",&get_logfile,0); &compare_output($answer,&get_logfile(1)); --- 50,65 ---- ."$make_name: Leaving directory `$pwd'\n"; } ! if ($parallel_jobs) ! { ! $mkoptions = "CFLAGS=-O -w -j 2"; ! } ! else ! { ! $mkoptions = "CFLAGS=-O -w"; ! } ! ! &run_make_with_options($makefile,$mkoptions,&get_logfile,0); &compare_output($answer,&get_logfile(1)); *** scripts/options/dash-l.~1~ Thu Aug 19 16:57:50 1999 --- scripts/options/dash-l Sat Sep 4 16:23:36 1999 *************** *** 41,47 **** close(MAKEFILE); ! &run_make_with_options($makefile, "-j 4 -l 0.0001", &get_logfile); $slurp = &read_file_into_string (&get_logfile(1)); if ($slurp !~ /cannot enforce load limit/) { --- 41,56 ---- close(MAKEFILE); ! if ($parallel_jobs) ! { ! $mkoptions = "-j 4 -l 0.0001"; ! } ! else ! { ! $mkoptions = "-l 0.0001"; ! } ! ! &run_make_with_options($makefile, $mkoptions, &get_logfile); $slurp = &read_file_into_string (&get_logfile(1)); if ($slurp !~ /cannot enforce load limit/) {