Fix path name checks for case-insensitive file systems.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 6 Jan 2010 01:56:25 +0000 (01:56 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 6 Jan 2010 01:56:25 +0000 (01:56 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4593 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/BuilderTests.py

index b72b1338652eb213f6ca3cb91ed51896e91e747a..dc60d06d36699ce2544ca6d5991c0049b3d86e68 100644 (file)
@@ -691,13 +691,15 @@ class BuilderTestCase(unittest.TestCase):
         env['CNT'] = [0]
         tgt = builder(env, target=outfiles[0], source=infiles[0])[0]
         s = str(tgt)
-        assert s == test.workpath('0.out'), s
+        t = os.path.normcase(test.workpath('0.out'))
+        assert os.path.normcase(s) == t, s
         tgt.prepare()
         tgt.build()
         assert env['CNT'][0] == 1, env['CNT'][0]
         tgt = builder(env, outfiles[1], infiles[1])[0]
         s = str(tgt)
-        assert s == test.workpath('1.out'), s
+        t = os.path.normcase(test.workpath('1.out'))
+        assert os.path.normcase(s) == t, s
         tgt.prepare()
         tgt.build()
         assert env['CNT'][0] == 2
@@ -713,9 +715,10 @@ class BuilderTestCase(unittest.TestCase):
             # support anyway, don't bother trying to test for it.
             pass
         else:
-            s = str(tgts)
-            expect = str([test.workpath('2.out'), test.workpath('3.out')])
-            assert s == expect, s
+            s = map(str, tgts)
+            expect = [test.workpath('2.out'), test.workpath('3.out')]
+            expect = map(os.path.normcase, expect)
+            assert map(os.path.normcase, s) == expect, s
         for t in tgts: t.prepare()
         tgts[0].build()
         tgts[1].build()