summaryrefslogtreecommitdiff
path: root/tests/run_make_tests.pl
Commit message (Collapse)AuthorAgeFilesLines
* tests: Run each file in a separate directoryPaul Smith2023-04-021-84/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid cross-contamination between test files by creating a new working directory for each file, and setting it as the current directory before starting the tests in that file. Rename the test output as tNNN.{base,log,diff,mk} where NNN is a test number starting with 001 for the first test. It is slightly more annoying to find diff files since you can't use autocomplete directly but it is simpler to match things. Detect the source directory as the location of the test_driver.pl script, so remove the separate -srcdir option. * Makefile.am: Remove hacks to create symlinks when building out-of-tree, and remove -srcdir option from run_make_tests. * tests/test_driver.pl: Locate $srcpath based on __FILE__, then compute $toppath as its parent. Set $scriptpath under $srcpath and $workpath under the current directory. Toss $*_filename and modify get_logfile() etc. to use the suffix directly. Add a chdir() around the invocation of the test. * tests/run_make_tests.pl: Throw out the -srcdir option and use $srcpath set in test_driver.pl. The #WORK# helper is no longer useful so remove it. Set #PWD# to the current working dir. Always search the local directory and $srcpath for config-flags.pm. Use $srcpath for finding the thelp.pl script. * tests/scripts/features/vpath: Don't put things in work/ as it is no longer a subdirectory. * tests/scripts/features/vpathgpath: Ditto. * tests/scripts/features/vpathplus: Ditto. * tests/scripts/misc/general1: Ditto. * tests/scripts/misc/general2: Ditto. * tests/scripts/options/dash-k: Ditto. * tests/scripts/options/symlinks: Use $testpath as the working directory. * tests/scripts/variables/GNUMAKEFLAGS: Use the test helper to display env var values (grepping for GNUMAKEFLAGS finds extra things now that it is our current working directory).
* Allow jobserver style to be forced to "pipe"Paul Smith2023-02-191-0/+1
| | | | | | | | | | | | | | Some systems that support mkfifo() don't support the usage that GNU make wants. Provide a way to force using "pipe" jobserver mode even when mkfifo() is available. * src/makeint.h (MK_OS_HURD): Define if we're on Hurd. (JOBSERVER_USE_FIFO): Define if we have mkfifo() and we're NOT on Hurd. * src/main.c (main): Test JOBSERVER_USE_FIFO not HAVE_MKFIFO. * src/posixos.c (jobserver_setup): Ditto. * maintMakefile: Create a config check test for forcing "pipe" mode. * tests/run_make_tests.pl: Show discovered FEATURES in verbose mode.
* [SV 62654] Support GNU Make on z/OSPaul Smith2023-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original patches provided by Igor Todorovski <itodorov@ca.ibm.com> Reworked by Paul Smith <psmith@gnu.org>. Thanks to IBM for providing a test system. * NEWS: Announce support. * AUTHORS: Ditto. * README.zOS: Provide details on building GNU Make on z/OS. * build.sh (get_mk_var): z/OS sh has a strange bug which causes it to generate extra lines of output: rework the function to print output as we compute it instead of collecting it into a variable, which works around this bug. * src/makeint.h: Declare MK_OS_ZOS if we're building for z/OS. * src/arscan.c: Don't include <ar.h> on z/OS. * src/job.c: We can't change environ in ASCII mode on z/OS. * src/main.c: Ditto. Also we can't use pselect() on z/OS. * src/posixos.c: pselect() seems to hang on z/OS: don't use it. * tests/run_make_tests.pl: Handle different exit codes on z/OS. * tests/test_driver.pl: Preserve some special z/OS env.vars. Add special checks to output comparisons when on z/OS. * tests/scripts/features/archives: Don't validate names. Don't try to compile empty files as IBM compilers complain. * tests/scripts/features/shell_assignment: Fix octal value of #. * tests/scripts/features/temp_stdin: Don't print "term". * tests/scripts/functions/shell: Handle shell exit codes. * tests/scripts/targets/ONESHELL: Ditto. * tests/scripts/targets/POSIX: sh -x prints differently. * tests/scripts/variables/SHELL: Ditto.
* Convert references from "GNU make" to "GNU Make"Paul Smith2023-01-011-3/+3
|
* Update the copyright year on all filesPaul Smith2023-01-011-1/+1
|
* tests [WINDOWS32]: Support Strawberry Perl on WindowsPaul Smith2022-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strawberry Perl has some different behaviors from ActiveState Perl which impact the test suite: - Avoid Perl's chomp() as it may not remove CRs; chomp() may remove only the final NL but not the CR in a CRNL line ending. - Strawberry Perl doesn't support ActiveState's system(1, ...) form. - Strawberry Perl (or msys?) does something weird with "/tmp" when provided to exec(), replacing it with the user's %TEMP%. - Strawberry Perl uses msys paths like /c/foo instead of C:\foo. * tests/test_driver.pl (get_osname): Strawberry Perl uses 'msys' as its $^O so if we see that use a port of 'W32'. (_run_with_timeout): Strawberry Perl doesn't support the special system(1, ...) form of system() so use POSIX standard fork/exec. (compare_answer): Paths generated by Strawberry Perl use msys path format (e.g., /c/foo instead of C:\foo); check for those differences and compare RE against both the unmodified and modified log. * tests/run_make_tests.pl (set_defaults): Switch from chomp to s/// to remove CRNL and NL line endings. * tests/scripts/features/errors: Executing directories on Strawberry will give an error; translate it to Windows error output format. * tests/scripts/features/output-sync: Ditto. * tests/scripts/features/temp_stdin: Ditto. * tests/scripts/functions/realpath: Ditto. * tests/scripts/options/dash-I: Ditto. * tests/scripts/variables/INCLUDE_DIRS: Ditto. * tests/scripts/misc/close_stdout: /dev/full is reported as existing on Strawberry Perl, but it doesn't do anything. Skip the test. * tests/scripts/variables/MAKEFLAGS: When an argument containing /tmp is passed to a program via exec(), something replaces it with the expansion of the %TEMP% variable. Instead of using /tmp create a local directory to use.
* tests: Don't convert \ to / when checking regex'sPaul Smith2022-11-131-1/+0
| | | | | | | | | | | | | When tests compare the output they will try converting backslashes to slashes to see if that works. When we compare using regex's, we can't do that because backslashes can escape special characters. * tests/test_driver.pl (compare_output): Clean up this function. (compare_answer_vms) [VMS]: Comparing answers on VMS is complex; move all of it into its own function returning 0/1. (compare_answer): A new function to compare answers: return 0/1. Remember the CRLF->LF conversion forever; only check \ -> / when we compare strings, not regex's.
* [SV 62174] Force locale to be "C" before retrieving error messagesPaul Smith2022-10-281-72/+75
| | | | | | | | | | | We attempt to do this with POSIX::setlocale() but apparently on some systems (AIX) this isn't sufficient. So, in addition force the LC environment variables to use "C". Reported by Dmitry Goncharov <dgoncharov@users.sf.net>. * tests/run_make_tests.pl: Move the global setup into set_default(). Force the %ENV locale variables to use the ones we'll use when running make, then reset them back again after we find error messages.
* Enhance tests to work on different systemsPaul Smith2022-10-221-4/+9
| | | | | | | | | | | | | | | | | | | | | The GNU platform testers reported a number of test errors on different systems; try to address them. * tests/thelp.pl: A number of tests timed out with a 4-second timeout. Increase the default timeout to 10 seconds. * tests/run_make_tests.pl: Executing directories on cygwin behaves differently in Perl than make so skip these tests there. * tests/scripts/options/symlinks: Check for the symlink feature in make, rather than whether the system supports them. * tests/scripts/features/implicit_search: On some systems "false" exits with a different exit code. Use the helper instead. * tests/scripts/features/loadapi: Ditto. * tests/scripts/features/output-sync: Sleep before make -f bar in the first test as well as the second one. * tests/scripts/features/exec: Skip on cygwin, which seems to be "UNIX" but where scripts don't run normally. * tests/scripts/misc/fopen-fail: Skip on cygwin, where make eventually exits with exit code 0 and no error messages.
* * NEWS: Use GNU Make instead of GNU makePaul Smith2022-10-181-1/+1
| | | | | | | | | | | | * README.git: Ditto. * README.Amiga: Ditto. * README.DOS: Ditto. * README.OS2: Ditto. * README.VMS: Ditto. * README.W32: Ditto. * README.customs: Ditto. * make-gdb.py: Ditto. * tests/run_make_tests.pl: Ditto.
* Update URLs to use https rather than httpPaul Smith2022-10-181-1/+1
| | | | | * (all): Change http:// to https:// * README.W32: Remove invalid link to mingw.org.
* [SV 12078, SV 62809] Rebuild grouped targets if any is missingPaul Smith2022-09-201-0/+1
| | | | | | | | | | | | | | | | | | | If any of a set of grouped targets is missing or out of date, even if make is not trying to build that target, rebuild them all. Ensure this is true for explicit grouped targets as well as pattern rule grouped targets. Original patch by Jonathan Gravel <jo@stashed.dev> * src/remake.c (update_file_1): After matching any pattern rules, go through the also_make targets and set noexist as needed. Also compute the oldest this_mtime. * tests/scripts/features/grouped_targets: Add regression tests. * tests/scripts/features/patternrules: Ditto. * tests/features/vpath: Rewrite to use modern run_make_test(). Add a test that we check for VPATH before implicit rule search. Move the tests in vpath2 and vpath3 into this suite. * tests/features/vpathplus: Rewrite to use modern run_make_test().
* Fix bootstrap.bat for bootstrapping on WindowsPaul Smith2022-08-221-2/+2
| | | | | | | | | | | | | | | | * README.git: Clarify that these methods are lightly tested. * build_w32.bat: Don't support any config step: fail if not completed. Move the config steps into bootstrap.bat. Don't print compile lines by default and add a --verbose option to show them. * bootstrap.bat: Ensure we have curl and sed before we do anything. Pull the latest necessary files from gnulib. Create a convert.sed script that can update the various template files, and update Basic.mk, config.h.W32, and gmk-default.h. * tests/run_make_tests.pl: Remove CRLF rather than using chop. If we run perl in Git for Bash it seems to handle newlines differently. * tests/scripts/features/temp_stdin: Remove the make copy and close STDIN so we can delete the temp file on Windows. * .gitignore: Ignore the convert.sed script.
* * tests/run_make_tests.pl: Exit 1 if we detect an error.Paul Smith2022-07-091-3/+3
|
* [SV 62145] Remove a stdin temp file on re-exec failure.Dmitry Goncharov2022-04-241-2/+2
| | | | | | | | | | | | If the re-exec fails, be sure to remove a temp makefile that was created to read from stdin. * src/job.c (exec_command): Return on failure. (child_execute_job): Call exit if exec_command returns. * src/job.h (exec_command): Don't mark as NORETURN. * src/main.c (main): Unlink stdin temporary file if re-exec fails. * tests/run_make_tests.pl: Get value for ERR_nonexe_file/ERR_exe_dir. * tests/scripts/features/temp_stdin: Test that temp file unlink works.
* tests: Allow run_make_test() to avoid passing -fPaul Smith2022-02-271-1/+1
| | | | | | | | | | | | We already use undef makefile strings to mean "re-use the previous makefile", so if the string is empty we'll assume it means "don't use a makefile at all" (don't add -f). * tests/run_make_tests.pl (run_make_test): If the makefile string is empty, don't create a makefile or add -f. * tests/scripts/features/include: Change empty makefile to "\n". * tests/scripts/misc/close_stdout: Ditto. * tests/scripts/options/dash-r: Ditto.
* * <all>: Update copyright notices.Paul Smith2022-02-101-1/+1
|
* Don't write $(shell ...) stdout to stderr on failurePaul Smith2022-02-061-0/+10
| | | | | | | | | | | | | | | | | If a $(shell ...) invocation failed due to a command-not-found error, make wrote the stdout of that shell to our stderr for some reason. That seems very wrong. If the command's stderr was not redirected then its output would have already been written to its stderr, and if it was redirected then we shouldn't take it upon ourselves to force it to go to stderr! * src/function.c (func_shell_base): Append shell stdout even if the shell command failed. * tests/run_make_tests.pl: Determine the error generated for command-not-found situations. * tests/scripts/functions/shell: Verify that redirecting stderr to stdout will behave properly if the command is not found.
* Use a well-known error string for out-of-bound function argumentsPaul Smith2021-12-191-8/+0
| | | | | | | | | | | * src/function.c (parse_numeric): Check for empty value and error. If we find ERANGE just print our own error, not strerror. (func_word): Use a generic "not good" error message. (func_wordlist): Ditto (func_intcmp): Ditto * tests/run_make_tests.pl: Remove code to find strerror(ERANGE) * tests/scrips/functions/intcmp: Update the error message. * tests/scrips/functions/word: Ditto.
* Convert word, wordlist, and intcmp functions to use long longPaul Smith2021-11-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | Modify make functions that parse integer values to use long long values instead of long: on Windows long is the same as int (4 bytes) and we don't want behavior to differ between different platforms. * bootstrap.conf: Change strtol module to strtoll module. * src/function.c (parse_numeric): Use strtoll() and return long long. (func_word): Use long long. (func_wordlist): Use long long. Verify second argument is >= 0. (func_intcmp): Use long long. * src/config.ami.template: Don't define HAVE_STRTOLL. * src/config-vms.template: Define HAVE_STRTOLL. * src/config.W32.template: Define HAVE_STRTOLL. * tests/run_make_tests.pl: Set $ERR_out_of_range to the proper string. * tests/scripts/functions/word: Rework to use the new style and avoid TAB characters. Verify trailing whitespace is ignored. Add a test for a negative second argument to wordlist. Add tests for max signed integer values. Use $ERR_out_of_range for the error string. * tests/scripts/functions/intcmp: Add tests for min and max signed integer values. Use $ERR_out_of_range for the error string.
* tests: Enhance output to contain filename/line number infoPaul Smith2021-11-271-10/+5
| | | | | | | | * tests/scripts/options/dash-I: Use string comparison operator. * tests/test_driver.pl (cmd2str): New method to convert a command line to a string with proper quoting. * tests/run_make_tests.pl (create_command): Call cmd2str() to format the command. Add the filename/line number to the output.
* [SV 45211] Parse MAKEFLAGS immediately when it's resetPaul Smith2021-09-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When MAKEFLAGS is set in a makefile, reparse it immediately rather than waiting until after all makefiles have been read and parsed. This change doesn't actually fix the SV bug referenced because, even though we do reparse MAKEFLAGS, we don't handle the -r or -R options immediately. Doing this will require more effort. * NEWS: Announce the change. * src/makeint.h: Publish reset_switches() and decode_env_switches() from main.c * src/main.c (main): Don't call construct_include_path(); it will be invoked decode_switches(). Preserve the old values of builtin_rules, builtin_variables, and job_slots before we read makefiles since they can be changed now. (reset_switches): Publish (remove static). Set the initial value of the stringlist list to NULL. (decode_switches): Call construct_include_path() after decoding. (decode_env_switches): Publish (remove static). (define_makeflags): Set the MAKEFLAGS variable for special handling. * src/read.c (eval_makefile): Check for empty include_directories. (construct_include_path): Clear any old value of .INCLUDE_DIRS before appending new values. Free the previous include_directories. * src/variable.c (lookup_special_var): When MAKEFLAGS is set, first reset the switches then re-parse the variable. * tests/run_make_tests.pl: Memo-ize some default variable values. * tests/scripts/options/dash-r: Create tests for setting -r and -R. * tests/scripts/variables/MAKEFLAGS: Test that resetting -I from within the makefile takes effect immediately.
* Update copyright statements for 2020Paul Smith2020-01-031-1/+1
|
* * tests/run_make_tests.pl (set_more_defaults): Fix typoPaul Smith2019-12-171-1/+1
|
* * tests/run_make_tests.pl (subst_make_string): Force use of /Paul Smith2019-12-161-2/+13
| | | | | | On Windows the path to the helper tool will contain '\': this will fail if recipes are run with a POSIX shell. Convert '\' to '/' on Windows. While here, escape any spaces in the path as well.
* Rename jhelp.pl to thelp.pl and make it a generic test helper.Paul Smith2019-12-161-0/+11
| | | | | | | | | | | | | | | * tests/thelp.pl: Rename from tests/jhelp.pl. (op): Use names instead of options for the operations. (op): Add new operations for sleep, mkdir, and rm. (op): Enhance wait to time out * tests/run_make_tests.pl: Add a new #HELPER# replacement (subst_make_string): Use fully-qualified path to thelp.pl * tests/scripts/features/parallelism: Update to use thelp.pl and the new named operations. Use thelp.pl sleep instead of system-specific sleep commands. * tests/scripts/features/output-sync: Update to use thelp.pl instead of complex shell scripts. * Makefile.am: Distribute tests/thelp.pl instead of tests/jhelp.pl
* * Makefile.am (check-regression): Use PERLFLAGS when running PerlPaul Smith2019-10-051-8/+2
| | | | | * maintMakefile: Set PERLFLAGS to enable warnings. * tests/run_make_tests.pl: Clean up issues pointed out by perl -w.
* tests: Convert %CONFIG_FLAGS to get_config()Paul Smith2019-10-051-2/+6
| | | | | | | | | | | | * tests/config-flags.pm.W32: Create a predefined Windows file. * Makefile.am (test_FILES): Add it to the distribution. * build_w32.bat: Install tests/config-flags.pm if not existing. * tests/run_make_tests.pl (get_config): Create new function. * tests/scripts/features/archives: Call get_config() rather than using %CONFIG_FLAGS directly. * tests/scripts/features/load: Ditto. * tests/scripts/features/loadapi: Ditto. * tests/scripts/functions/wildcard: Ditto.
* * tests/run_make_tests.pl (valid_option): Add missing File::SpecPaul Smith2019-10-051-1/+1
|
* * tests: Convert from File::Spec::Functions to File::Spec.Paul Smith2019-09-211-19/+20
| | | | | Users report the Functions version doesn't work correctly for some older versions of Perl.
* * tests/run_make_test.pl: Fix support for valgrind.Paul Smith2019-09-211-12/+17
| | | | | Change the variable holding the make command to be a list that can hold extra commands and options, not just a string.
* * tests/run_make_tests.pl (find_prog): Fix syntax error.Paul Smith2019-09-211-1/+1
|
* * tests/run_make_tests.pl: Create $scriptsuffix for Windows/VMS.Paul Smith2019-09-161-0/+7
| | | | | * tests/scripts/features/targetvars: Add a suffix to scripts. * tests/scripts/misc/general4: Ditto.
* Refresh the test suite framework implementation.Paul Smith2019-09-161-156/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | Go through both run_make_tests.pl and test_driver.pl and slightly modernize the Perl and clean up indentation etc. Fix a number of warnings in the test scripts detected by running with -w. * tests/test_driver.pl: Move make error string detection out of the base test driver. (run_all_tests): Ensure that we always look for tests in the cwd. * tests/run_make_tests.pl: Use File::Spec for path manipulations. Correctly use setlocale() when detecting error strings. Get configuration from the config-flags.pm file not config.status. * tests/scripts/features/archives: Use new $cwddir variable. * tests/scripts/features/reinvoke: Add missing semicolon. * tests/scripts/features/vpath2: Avoid non-existent variable. * tests/scripts/functions/foreach: Escape variables. * tests/scripts/misc/bs-nl: Remove non-existing \v escape sequence. * tests/scripts/misc/general4: Use handy create_file(). * tests/scripts/options/dash-C: Use Cwd/$cwddir. * tests/scripts/options/dash-I: Use subst_make_string() and #PWD#. * tests/scripts/options/symlinks: Use File::Spec. * tests/scripts/targets/DEFAULT: Use create_file and run_make_test. * tests/scripts/variables/CURDIR: Use run_make_test. * tests/scripts/variables/automatic: Remove extraneous "\". * tests/scripts/vms/library: Remove extra "my" and extraneous "\".
* * tetss/run_make_test.pl: Avoid 'sh -c' for Windows portability.Paul Smith2019-09-071-2/+2
|
* Update copyright statements for 2019Paul Smith2019-05-191-1/+1
|
* Queue failed fork() (etc.) to be handled like any other failed job.Paul Smith2018-08-041-3/+10
| | | | | | | | | | | | | | | | | | | | | | | If we failed to fork() we were essentially exiting make immediately without respect to ignore flags, etc. On one hand that makes sense because if you can't fork you're in real trouble, but it doesn't work so well on systems where we don't fork at all. Instead, treat a fork error like any other error by delaying the handling until the next call to reap_children(). Any child with a PID of -1 is considered to have died before starting so check these first without waiting for them. * src/commands.c (fatal_error_signal): Don't kill children that never started. * src/function.c (func_shell_base): Handle cleanup properly if the child doesn't start. * src/job.c (reap_children): Check for children that died before starting and handle them without waiting for the PID. (start_job_command): Free memory when the child doesn't start. (start_waiting_job): Don't manage children who never started. (child_execute_job): If the fork fails return PID -1. * src/vmsjobs.c: Check for children that never started. * tests/run_make_tests.pl: Parse config.status to get all options.
* * all: Update Copyright statements for 2018Paul Smith2018-07-011-1/+1
|
* Rework directory structure to use GNU-recommended "src" directory.Paul Smith2017-11-191-3/+3
| | | | | | | | | | | | | | | | | Move the source code (other than glob) into the "src" subdirectory. Update all scripting and recommendations to support this change. * *.c, *.h, w32/*: Move to src/ * configure.ac, Makefile.am, maintMakefile: Locate new source files. * Basic.mk.template, mk/*: Update for new source file locations. * NEWS, README.DOS.template: Update for new locations. * build.template, build_w32.bat, builddos.bat: Ditto. * po/POTFILES.in: Ditto * tests/run_make_tests.pl, tests/scripts/features/load*: Ditto. * make.1: Move to doc. * mk/VMS.mk: Add support for building on VMS (hopefully). * makefile.vms, prepare_w32.bat: Remove. * SCOPTIONS: Update to define HAVE_CONFIG_H
* Remove unsupported build facilities.Paul Smith2017-11-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over time the non-standard build and install systems (nmake files, smake files, Visual Studio project files, etc.) have atrophied and maintaining them is not worth the effort, for such a simple utility as make. Remove all the non-standard build tool support and unify OS-specific build rules under a basic set of (GNU make) makefiles. Preserve the existing bootstrapping scripts (for POSIX, Windows, and MS-DOS). Also the existing VMS build scripts are left unchanged: I don't have enough experience with VMS to venture into this area. Perhaps one of the VMS maintainers might like to determine whether conversion would be appropriate. Rather than create libraries for w32 and glob (non-POSIX), simply link the object files directly to remove the complexity. * NEWS: Update with user-facing notes. * Makefile.am: Clean up to use the latest automake best practices. Build Windows code directly from the root makefile to avoid recursion. * README.Amiga, README.DOS.template, README.W32.template: Updated. * INSTALL: Point readers at the README.git file. * maintMakefile: Remove obsolete files. Create Basic.mk file. * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. * build_w32.bat: Copy Basic.mk to Makefile * configure.ac: We no longer need AM_PROG_AR. * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. * Makefile.DOS.template: Remove. * NMakefile.template, w32/subproc/NMakefile: Remove. * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. * configure.bat, glob/configure.bat: Remove. * w32/Makefile.am: Remove. * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
* Update copyright statements for 2017.Paul Smith2017-07-091-1/+1
|
* Add test suite support to WindowsPaul Smith2017-06-041-59/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * main.c (main): Sanitize program name detection on Windows. * makeint.h: 'program' is a const string on all platforms now. * tests/run_make_tests.bat: Windows bat file to invoke tests * tests/test_driver.pl: Obtain system-specific error messages. (get_osname): Compute the $port_type here. Add more $osname checks for different Windows Perl ports. (_run_command): Rewrite the timeout capability to work properly with Windows. Don't use Perl fork/exec; instead use system(1,...) which allows a more reliable/proper kill operation. Also, allow options to be given as a list instead of a string, to allow more complex quoting of command-line arguments. * tests/run_make_tests.pl (run_make_with_options): Allow options to be provided as a list in addition to a simple string. (set_more_defaults): Write sample makefiles and run make on them instead of trying to run echo and invoking make with -f-, to avoid relying on shell and echo to get basic configuration values. Also create a $sh_name variable instead of hard-coding /bin/sh. * tests/scripts/features/archives: Skip on Windows. * tests/scripts/features/escape: Use list method for passing options. * tests/scripts/features/include: Use system-specific error messages. * tests/scripts/features/output-sync: "Command not found" errors generate very different / odd output on Windows. This needs to be addressed but for now disable these tests on Windows. * tests/scripts/functions/abspath: Disable on Windows. * tests/scripts/functions/file: Use system-specific error messages. * tests/scripts/functions/shell: "Command not found" errors generate very different / odd output on Windows. This needs to be addressed but for now disable these tests on Windows. * tests/scripts/misc/close_stdout: Disable on Windows. * tests/scripts/options/dash-k: Use system-specific error messages. * tests/scripts/options/dash-l: Disable on Windows. * tests/scripts/options/eval: Use list method for passing options. * tests/scripts/options/general: Skip some non-portable tests. * tests/scripts/targets/ONESHELL: Skip some non-portable tests. * tests/scripts/targets/POSIX: Skip some non-portable tests. * tests/scripts/variables/MAKEFILES: Skip some non-portable tests. * tests/scripts/variables/SHELL: Use a makefile not -f- for testing.
* * tests/run_make_tests.pl: [SV 50902] Find Perl modulesEnrique Olaizola2017-06-041-0/+3
|
* Portability changes for the test suite.Paul Smith2016-12-261-2/+6
| | | | | | * tests/test_driver.pl: Save error strings for later comparison. * tests/run_make_tests.pl: Create portable commands for later use. * tests/*: Use these new variables.
* * tests/run_make_tests.pl: Add file/lineno info to .run file.Paul Smith2016-04-041-3/+9
|
* * tests/run_make_tests.pl: Preserve $make_commandPaul Smith2016-03-231-0/+2
| | | | | * tests/scripts/options/dash-n: Use $make_command. This fixes a spurious failure when running tests with valgrind enabled.
* Update Copyright statements for the new year.Paul Smith2016-02-281-1/+1
|
* Set up for running tests on VMS.John Malmberg2014-10-201-0/+7
| | | | | | | | | * run_make_tests.pl: set $port_type to be 'VMS-DCL' when the test are run from the VMS DCL Interpreter. When the tests are run from GNV on VMS, the $port_type will be 'UNIX'. * run_make_tests.com: VMS search list support. This is needed for using a search list such as prj_root = lcl_root:,vms_root:,src_root: for building and testing.
* Update Copyright statements for 2014.Paul Smith2014-09-301-1/+1
|
* Update the regression test harness to support VMS.John Malmberg2014-07-071-8/+66
| | | | | | | | | | | | | | | | | * config_flags_pm.com, test_make.com: set up and run the regression test environment on VMS. * tests/run_make_tests.pl [VMS]: Use an alternate rmdir() implementation on VMS. (run_make_with_options) [VMS]: Provide VMS-specific quoting and shell invocations. (set_more_defaults) [VMS]: Set default values when running on VMS. * tests/test_driver.pl (vms_get_process_logicals) [VMS]: Retrieve the proper values from %ENV on VMS. (resetENV) [VMS]: Use it. (toplevel) [VMS]: Fix a bug with opendir() on some logical_devices. (compare_output) [VMS]: Convert VMS test output to a "standard" format. (_run_command) [VMS]: Handle signals and exit codes the VMS way. (remove_directory_tree_inner) [VMS]: Unlink all versions of the file.