summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-05-16 01:12:33 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-05-16 01:12:33 (GMT)
commite1f45301646aaee52bb189cf97cd010eca4ec1ec (patch)
treeab328621e1cdf0324c810e3e17df472056f90928
parent06dffc4bcead59e0f3d7986ae17c597d8afe71e5 (diff)
downloadSCons-e1f45301646aaee52bb189cf97cd010eca4ec1ec.zip
SCons-e1f45301646aaee52bb189cf97cd010eca4ec1ec.tar.gz
SCons-e1f45301646aaee52bb189cf97cd010eca4ec1ec.tar.bz2
py2/3 disable symlink testing on py3. not supported by scons at this time
-rw-r--r--test/Clean/basic.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/Clean/basic.py b/test/Clean/basic.py
index 74e7711..7c4730e 100644
--- a/test/Clean/basic.py
+++ b/test/Clean/basic.py
@@ -54,7 +54,8 @@ env.B(target = 'foo3.out', source = 'foo3.in')
env.B(target = 'foo4.out', source = 'foo4.in')
env.NoClean('foo4.out')
import os
-if hasattr(os, 'symlink'):
+import sys
+if hasattr(os, 'symlink') and sys.platform !='win32':
def symlink1(env, target, source):
# symlink to a file that exists
os.symlink(str(source[0]), str(target[0]))
@@ -124,7 +125,7 @@ test.must_match(test.workpath('foo4.out'), "foo4.in\n")
test.must_exist(test.workpath('touch1.out'))
test.must_exist(test.workpath('touch2.out'))
-if hasattr(os, 'symlink'):
+if test.platform_has_symlink():
test.fail_test(not os.path.islink(test.workpath('symlink1')))
test.fail_test(not os.path.islink(test.workpath('symlink2')))
@@ -148,7 +149,7 @@ test.must_exist(test.workpath('foo4.out'))
test.must_not_exist(test.workpath('touch1.out'))
test.must_not_exist(test.workpath('touch2.out'))
-if hasattr(os, 'symlink'):
+if test.platform_has_symlink():
test.fail_test(os.path.islink(test.workpath('symlink1')))
test.fail_test(os.path.islink(test.workpath('symlink2')))