diff options
author | Steven Knight <knight@baldmt.com> | 2001-12-21 19:01:07 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-12-21 19:01:07 (GMT) |
commit | f6ab3b3b0b9847db2041de8e46401e0f44c2be9b (patch) | |
tree | 6dbbcf14d190504d14c3dc4a949f9d88d6e14402 /src/engine | |
parent | ed3aa5e39e64a5b48b493f33d1438572678d8b65 (diff) | |
download | SCons-f6ab3b3b0b9847db2041de8e46401e0f44c2be9b.zip SCons-f6ab3b3b0b9847db2041de8e46401e0f44c2be9b.tar.gz SCons-f6ab3b3b0b9847db2041de8e46401e0f44c2be9b.tar.bz2 |
Windows NT portability fixes for tests.
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 3 | ||||
-rw-r--r-- | src/engine/SCons/Node/FS.py | 1 | ||||
-rw-r--r-- | src/engine/SCons/Node/FSTests.py | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index c2faa35..878e736 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -220,7 +220,8 @@ class EnvironmentTestCase(unittest.TestCase): tgt = env.Install('export', [ 'build/foo1', 'build/foo2' ]) paths = map(str, tgt) paths.sort() - assert paths == [ 'export/foo1', 'export/foo2' ], paths + expect = map(os.path.normpath, [ 'export/foo1', 'export/foo2' ]) + assert paths == expect, paths for tnode in tgt: assert tnode.builder == InstallBuilder diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index ee5deaa..adfd440 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -192,6 +192,7 @@ class FS: dir.path_ = drive + dir.path_ dir.abspath = drive + dir.abspath dir.abspath_ = drive + dir.abspath_ + dir.srcpath = dir.path return self.Root.setdefault(drive, dir) if head: # Recursively look up our parent directories. diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index b166be1..f2130d7 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -68,8 +68,8 @@ class BuildDirTestCase(unittest.TestCase): f1 = fs.File('build/test1') fs.BuildDir('build', 'src') f2 = fs.File('build/test2') - assert f1.srcpath == 'src/test1', f1.srcpath - assert f2.srcpath == 'src/test2', f2.srcpath + assert f1.srcpath == os.path.normpath('src/test1'), f1.srcpath + assert f2.srcpath == os.path.normpath('src/test2'), f2.srcpath fs = SCons.Node.FS.FS() f1 = fs.File('build/test1') @@ -83,8 +83,8 @@ class BuildDirTestCase(unittest.TestCase): fs.BuildDir('build/var2', 'src') f1 = fs.File('build/var1/test1') f2 = fs.File('build/var2/test1') - assert f1.srcpath == 'src/test1', f1.srcpath - assert f2.srcpath == 'src/test1', f2.srcpath + assert f1.srcpath == os.path.normpath('src/test1'), f1.srcpath + assert f2.srcpath == os.path.normpath('src/test1'), f2.srcpath # Test to see if file_link() works... test=TestCmd(workdir='') |