summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2011-02-27 21:51:38 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2011-02-27 21:51:38 (GMT)
commite123fce835056a1e75c6630fe146bb7d45b19970 (patch)
tree313e397d99cd3214f373800f81fee756e8d43660
parentd52e3d6a0b0d9bd486c29ba0eb7e992fea14a786 (diff)
downloadSCons-e123fce835056a1e75c6630fe146bb7d45b19970.zip
SCons-e123fce835056a1e75c6630fe146bb7d45b19970.tar.gz
SCons-e123fce835056a1e75c6630fe146bb7d45b19970.tar.bz2
Misc Windows test cleanups
-rw-r--r--QMTest/TestCmd.py5
-rw-r--r--src/engine/SCons/Node/FSTests.py2
-rw-r--r--test/Delete.py31
3 files changed, 22 insertions, 16 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py
index 2c90302..d64ef78 100644
--- a/QMTest/TestCmd.py
+++ b/QMTest/TestCmd.py
@@ -1394,7 +1394,10 @@ class TestCmd(object):
under the temporary working directory.
"""
link = self.canonicalize(link)
- os.symlink(target, link)
+ try:
+ os.symlink(target, link)
+ except AttributeError:
+ pass # Windows has no symlink
def tempdir(self, path=None):
"""Creates a temporary directory.
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index e68bcd5..a60b8a4 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -1800,7 +1800,7 @@ class FSTestCase(_tempdirTestCase):
fs = self.fs
root = fs.Dir('/')
- d = root._lookup_abs('/tmp/foo/nonexistent-dir', SCons.Node.FS.Dir)
+ d = root._lookup_abs('/tmp/foo-nonexistent/nonexistent-dir', SCons.Node.FS.Dir)
assert d.__class__ == SCons.Node.FS.Dir, str(d.__class__)
def test_lookup_uncpath(self):
diff --git a/test/Delete.py b/test/Delete.py
index 0740a7c..49b4600 100644
--- a/test/Delete.py
+++ b/test/Delete.py
@@ -28,6 +28,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify that the Delete() Action works.
"""
+import sys
import os.path
import TestSCons
@@ -149,13 +150,14 @@ test.must_exist('f9.out-Delete')
test.must_exist('f14')
test.must_exist('d15')
test.must_not_exist('f16.out')
-test.must_exist('symlinks')
-test.must_exist('symlinks/dirtarget')
-test.must_exist('symlinks/dirtarget/dircontent')
-test.must_exist('symlinks/filetarget')
-test.must_exist('symlinks/filelink')
-test.must_exist('symlinks/brokenlink')
-test.must_exist('symlinks/dirlink')
+if sys.platform != 'win32':
+ test.must_exist('symlinks')
+ test.must_exist('symlinks/dirtarget')
+ test.must_exist('symlinks/dirtarget/dircontent')
+ test.must_exist('symlinks/filetarget')
+ test.must_exist('symlinks/filelink')
+ test.must_exist('symlinks/brokenlink')
+ test.must_exist('symlinks/dirlink')
test.run()
@@ -180,13 +182,14 @@ test.must_exist('d13-nonexistent.out')
test.must_not_exist('f14')
test.must_not_exist('d15')
test.must_match('f16.out', "f16.in\n")
-test.must_exist('symlinks')
-test.must_exist('symlinks/dirtarget')
-test.must_exist('symlinks/dirtarget/dircontent')
-test.must_exist('symlinks/filetarget')
-test.must_not_exist('symlinks/filelink')
-test.must_not_exist('symlinks/brokenlink')
-test.must_not_exist('symlinks/dirlink')
+if sys.platform != 'win32':
+ test.must_exist('symlinks')
+ test.must_exist('symlinks/dirtarget')
+ test.must_exist('symlinks/dirtarget/dircontent')
+ test.must_exist('symlinks/filetarget')
+ test.must_not_exist('symlinks/filelink')
+ test.must_not_exist('symlinks/brokenlink')
+ test.must_not_exist('symlinks/dirlink')
test.write("SConstruct", """\
def cat(env, source, target):