Commits

Gary Oberbrunner committed af50c98

Misc Windows test cleanups

Comments (0)

Files changed (3)

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.

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):
 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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.