Testsuite: opt-in to symlinks on Windows
authorTamar Christina <tamar@zhox.com>
Tue, 12 Feb 2019 20:51:41 +0000 (20:51 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Fri, 22 Feb 2019 01:52:42 +0000 (20:52 -0500)
testsuite/driver/testutil.py

index b73204f..09c50b4 100644 (file)
@@ -64,7 +64,7 @@ def lndir(srcdir, dstdir):
 #
 # We define the following function to make this magic more
 # explicit/discoverable. You are enouraged to use it instead of os.symlink.
-if platform.system() == 'Windows':
+if platform.system() == 'Windows' and os.getenv('FORCE_SYMLINKS') == None:
     link_or_copy_file = shutil.copyfile
 else:
     link_or_copy_file = os.symlink