Commits

Gary Oberbrunner  committed af50c98

Misc Windows test cleanups

  • Participants
  • Parent commits 82f35b8

Comments (0)

Files changed (3)

File QMTest/TestCmd.py

         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.

File src/engine/SCons/Node/FSTests.py

         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):

File test/Delete.py

 Verify that the Delete() Action works.
 """
 
+import sys
 import os.path
 
 import TestSCons
 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()
 
 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):