diff options
author | Steven Knight <knight@baldmt.com> | 2003-01-30 15:21:58 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-01-30 15:21:58 (GMT) |
commit | 8c857d116b57450227a1fe4bc822d8b2e5047f54 (patch) | |
tree | f56c695df46a5aa6e1e329a30511b7ee6f054d90 /test/BuildDir-errors.py | |
parent | 286d4a73c144735959428265a26a27ec8f46dae5 (diff) | |
download | SCons-8c857d116b57450227a1fe4bc822d8b2e5047f54.zip SCons-8c857d116b57450227a1fe4bc822d8b2e5047f54.tar.gz SCons-8c857d116b57450227a1fe4bc822d8b2e5047f54.tar.bz2 |
Win32 portability.
Diffstat (limited to 'test/BuildDir-errors.py')
-rw-r--r-- | test/BuildDir-errors.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/test/BuildDir-errors.py b/test/BuildDir-errors.py index dcfce09..f6646a7 100644 --- a/test/BuildDir-errors.py +++ b/test/BuildDir-errors.py @@ -76,15 +76,18 @@ test.run(chdir = 'normal', arguments = ".") test.fail_test(test.read(['normal', 'build', 'file.out']) != "normal/src/file.in\n") -# Verify the error when the BuildDir itself is read-only. -dir = os.path.join('ro-dir', 'build') -test.subdir(dir) -os.chmod(dir, os.stat(dir)[stat.ST_MODE] & ~stat.S_IWUSR) - -test.run(chdir = 'ro-dir', - arguments = ".", - status = 2, - stderr = "scons: *** Cannot duplicate `%s' in `build': Permission denied.\n" % os.path.join('src', 'SConscript')) +# Verify the error when the BuildDir itself is read-only. Don't bother +# to test this on Win32, because the ACL (I think) still allows the +# owner to create files in the directory even when it's read-only. +if sys.platform != 'win32': + dir = os.path.join('ro-dir', 'build') + test.subdir(dir) + os.chmod(dir, os.stat(dir)[stat.ST_MODE] & ~stat.S_IWUSR) + + test.run(chdir = 'ro-dir', + arguments = ".", + status = 2, + stderr = "scons: *** Cannot duplicate `%s' in `build': Permission denied.\n" % os.path.join('src', 'SConscript')) # Verify the error when the SConscript file within the BuildDir is # read-only. Note that we have to make the directory read-only too, |