Inherit essential environment variables in tests.
Note: it could be better to generalize this in SCons/Platform/posix.py
instead of just patching the tests.
diff --git a/SCons/ActionTests.py b/SCons/ActionTests.py
--- a/SCons/ActionTests.py
+++ b/SCons/ActionTests.py
@@ -98,6 +98,7 @@ outfile2 = test.workpath('outfile2')
pipe_file = test.workpath('pipe.out')
scons_env = SCons.Environment.Environment()
+scons_env['ENV']['PATH'] += os.environ['PATH']
# Capture all the stuff the Actions will print,
# so it doesn't clutter the output.
@@ -1090,6 +1091,8 @@ class CommandActionTestCase(unittest.TestCase):
except AttributeError:
env = Environment()
+ env = Environment(ENV={'PATH': os.environ['PATH']})
+
cmd1 = r'%s %s %s xyzzy' % (_python_, act_py, outfile)
act = SCons.Action.CommandAction(cmd1)
@@ -1884,7 +1887,7 @@ class ListActionTestCase(unittest.TestCase):
f.write("class2b\n")
act = SCons.Action.ListAction([cmd2, function2, class2a(), class2b])
- r = act([], [], Environment(out=outfile))
+ r = act([], [], Environment(out=outfile, ENV={'PATH' : os.getenv('PATH')}))
assert isinstance(r.status, class2b), r.status
c = test.read(outfile, 'r')
assert c == "act.py: 'syzygy'\nfunction2\nclass2a\nclass2b\n", c
@@ -1948,7 +1951,7 @@ class LazyActionTestCase(unittest.TestCase):
a([], [], env=Environment(BAR=f, s=self))
assert self.test == 1, self.test
cmd = r'%s %s %s lazy' % (_python_, act_py, outfile)
- a([], [], env=Environment(BAR=cmd, s=self))
+ a([], [], env=Environment(BAR=cmd, s=self, ENV={'PATH' : os.getenv('PATH')}))
c = test.read(outfile, 'r')
assert c == "act.py: 'lazy'\n", c
diff --git a/SCons/SConfTests.py b/SCons/SConfTests.py
--- a/SCons/SConfTests.py
+++ b/SCons/SConfTests.py
@@ -71,7 +71,9 @@ class SConfTestCase(unittest.TestCase):
# and we need a new environment, cause references may point to
# old modules (well, at least this is safe ...)
self.scons_env = self.Environment.Environment()
- self.scons_env.AppendENVPath('PATH', os.environ['PATH'])
+ # Inherit the OS environment to get essential variables.
+ inherited_env = os.environ.copy()
+ self.scons_env['ENV'] = inherited_env
# we want to do some autodetection here
# this stuff works with
guix/log/etc/release-manifest.scm?id=370468c5471a8bbb9862f8ec0d6b7aa3daa436cb&showmsg=1'>Expand)
Author |
2023-03-30 | maint: Add icecat to the release manifest....* etc/release-manifest.scm (%system-packages): Uncomment icecat.
| Andreas Enge |
2023-02-05 | gnu: Rename 'guile-3.0/fixed' to 'guile-3.0/pinned'....* gnu/packages/guile.scm: Rename variable 'guile-3.0/fixed' to
'guile-3.0/pinned', add deprecation.
* etc/release-manifest.scm (%packages-to-cross-build): Replace
'guile-3.0/fixed' with 'guile-3.0/pinned'.
* gnu/packages/autotools.scm (make-autoconf-wrapper)[inputs]: Likewise.
* gnu/packages/commencement.scm (guile-final): Likewise.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
| Simon Tournier |
2022-11-28 | maint: Leave 'gcc-toolchain' out for i586-gnu....This is a temporary measure to work around the fact that we're currently
lacking the necessary CPU power and human power to build everything up
to 'gcc-toolchain'.
* etc/release-manifest.scm (%base-packages/hurd): Comment out
"gcc-toolchain" for now.
| Ludovic Courtès |
2022-10-25 | maint: Tweak release manifest special case for armhf-linux....Don't remove the emacs package, as it does build and substitutes are
available. Do remove the guix package though, as it doesn't build due to Guile
memory issues while compiling the package modules.
* etc/release-manifest.scm (%base-packages/armhf): Don't replace the emacs
package, remove the guix package.
(%base-manifest): Remove FIXME comment as %base-packages/armhf doesn't relate
to build power.
| Christopher Baines |
2022-09-01 | maint: Ignore cross-compilation to x86....This is consistent with what's done by 'cross-jobs' in (gnu ci).
* etc/release-manifest.scm (%cross-manifest): Remove "x86_64-linux-gnu"
and "i686-linux-gnu" from the list returned by 'targets'.
| Ludovic Courtès |
2022-05-25 | Move (gnu platform) and (gnu platforms ...) to guix/....* gnu/platform.scm:
* gnu/platforms/arm.scm:
* gnu/platforms/hurd.scm:
* gnu/platforms/mips.scm:
* gnu/platforms/powerpc.scm:
* gnu/platforms/riscv.scm:
* gnu/platforms/s390.scm:
* gnu/platforms/x86.scm: Move to guix/.
* Makefile.am:
* doc/guix.texi (Porting to a New Platform):
* etc/release-manifest.scm:
* gnu/ci.scm:
* gnu/image.scm:
* gnu/local.mk:
* gnu/packages/bioinformatics.scm:
* gnu/packages/bootstrap.scm:
* gnu/packages/cross-base.scm:
* gnu/packages/instrumentation.scm:
* gnu/packages/linux.scm:
* gnu/system/image.scm:
* gnu/system/images/hurd.scm:
* gnu/system/images/novena.scm:
* gnu/system/images/pine64.scm:
* gnu/system/images/pinebook-pro.scm:
* gnu/system/images/rock64.scm:
* guix/scripts/build.scm:
* guix/scripts/system.scm:
* guix/self.scm: Update (gnu platform...) to (guix platform...).
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
| Josselin Poiret |
2022-05-22 | ci: Do not rely on hardcoded cross-targets lists....* gnu/ci.scm (%cross-targets): Remove it ...
(cross-jobs): ... and use the targets procedure instead.
* etc/release-manifest.scm: Adapt it.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
| Mathieu Othacehe |