]> git.ipfire.org Git - thirdparty/make.git/commit
tests: Simplify customization of %ENV
authorPaul Smith <psmith@gnu.org>
Wed, 1 Apr 2020 05:58:33 +0000 (01:58 -0400)
committerPaul Smith <psmith@gnu.org>
Wed, 1 Apr 2020 06:02:57 +0000 (02:02 -0400)
commitf79bde1a6d6899641370835fb2aafcd8ec224301
tree35f9a3e5a3dfc8c8363ca42ec38cbae13c1a276d
parent289108cc9bef892a46bba9b11e6989b36107415d
tests: Simplify customization of %ENV

Rather than having an %extraENV that is added to the default %ENV
and resetting %ENV _before_ each test, allow the test setup to
modify %ENV directly as needed then reset %ENV _after_ each test.

* tests/test_driver.pl: Remove unused %extraENV.
(resetENV): Don't add in %extraENV.
(_run_command): Reset after we run the command rather than before.
* tests/scripts/features/export: Convert %extraENV to %ENV
* tests/scripts/features/jobserver: Ditto
* tests/scripts/features/parallelism: Ditto
* tests/scripts/features/targetvars: Ditto
* tests/scripts/functions/eval: Ditto
* tests/scripts/functions/foreach: Ditto
* tests/scripts/functions/origin: Ditto
* tests/scripts/misc/general4: Ditto
* tests/scripts/options/dash-e: Ditto
* tests/scripts/targets/POSIX: Ditto
* tests/scripts/variables/GNUMAKEFLAGS: Ditto
* tests/scripts/variables/SHELL: Ditto
13 files changed:
tests/scripts/features/export
tests/scripts/features/jobserver
tests/scripts/features/parallelism
tests/scripts/features/targetvars
tests/scripts/functions/eval
tests/scripts/functions/foreach
tests/scripts/functions/origin
tests/scripts/misc/general4
tests/scripts/options/dash-e
tests/scripts/targets/POSIX
tests/scripts/variables/GNUMAKEFLAGS
tests/scripts/variables/SHELL
tests/test_driver.pl