From e1f45301646aaee52bb189cf97cd010eca4ec1ec Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 15 May 2017 18:12:33 -0700 Subject: py2/3 disable symlink testing on py3. not supported by scons at this time --- test/Clean/basic.py | 7 ++++--- 1 file 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'))) -- cgit v0.12