diff options
author | Mats Wichmann <mats@linux.com> | 2024-10-19 14:24:33 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2024-10-19 14:25:22 (GMT) |
commit | fb8932b837a2fe63dd5370e5b05a26f930db6f50 (patch) | |
tree | d7f2bd8f57f310d6dfe394d75aa5bb7955ed5bab /test | |
parent | c25c7b1d727f0da3288fa6c3cad6646e708d11e3 (diff) | |
download | SCons-fb8932b837a2fe63dd5370e5b05a26f930db6f50.zip SCons-fb8932b837a2fe63dd5370e5b05a26f930db6f50.tar.gz SCons-fb8932b837a2fe63dd5370e5b05a26f930db6f50.tar.bz2 |
Move IS_ROOT definition to framework
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/Install/Install.py | 5 | ||||
-rw-r--r-- | test/VariantDir/errors.py | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/test/Install/Install.py b/test/Install/Install.py index 8df9276..802b10d 100644 --- a/test/Install/Install.py +++ b/test/Install/Install.py @@ -31,6 +31,7 @@ import os.path import time import TestSCons +from TestCmd import IS_ROOT test = TestSCons.TestSCons() @@ -132,10 +133,6 @@ test.must_match(['work', 'f2.out'], "f2.in\n", mode='r') test.write(['work', 'f1.in'], "f1.in again again\n") # This test is not designed to work if running as root -try: - IS_ROOT = os.geteuid() == 0 -except AttributeError: - IS_ROOT = False if not IS_ROOT: os.chmod(test.workpath('work', 'export'), 0o555) with open(f1_out, 'rb'): diff --git a/test/VariantDir/errors.py b/test/VariantDir/errors.py index 531beea..1ff3be3 100644 --- a/test/VariantDir/errors.py +++ b/test/VariantDir/errors.py @@ -33,13 +33,10 @@ import os import stat import sys import TestSCons +from TestCmd import IS_ROOT test = TestSCons.TestSCons() -try: - IS_ROOT = os.geteuid() == 0 -except AttributeError: - IS_ROOT = False if IS_ROOT: test.skip_test('SConscript permissions meaningless when running as root; skipping test.\n') |