diff options
author | Steven Knight <knight@baldmt.com> | 2003-04-27 03:41:27 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-04-27 03:41:27 (GMT) |
commit | 98792e70711bb39b7862e4427c09787aab691631 (patch) | |
tree | bb3d460515d4d671900fa6cb5582d429de503e40 /src | |
parent | a925fbfbbecd978b6275ba0592e3bd21b0bd7781 (diff) | |
download | SCons-98792e70711bb39b7862e4427c09787aab691631.zip SCons-98792e70711bb39b7862e4427c09787aab691631.tar.gz SCons-98792e70711bb39b7862e4427c09787aab691631.tar.bz2 |
Follow-up test portability fixes for IRIX. (Chad Austin)
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/SCons/Util.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/UtilTests.py | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index a570a71..47aa37e 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -861,6 +861,10 @@ def dir_index(directory): for file in os.listdir(directory): fullname = os.path.join(directory, file) files.append(fullname) + + # os.listdir() isn't guaranteed to return files in any specific order, + # but some of the test code expects sorted output. + files.sort() return files def fs_delete(path, remove=1): diff --git a/src/engine/SCons/UtilTests.py b/src/engine/SCons/UtilTests.py index 5f0eaa8..b7aa478 100644 --- a/src/engine/SCons/UtilTests.py +++ b/src/engine/SCons/UtilTests.py @@ -631,21 +631,25 @@ class UtilTestCase(unittest.TestCase): test = TestCmd.TestCmd(workdir = '') base = test.workpath('') xxx = test.workpath('xxx.xxx') + ZZZ = test.workpath('ZZZ.ZZZ') sub1_yyy = test.workpath('sub1', 'yyy.yyy') + test.subdir('sub1') test.write(xxx, "\n") + test.write(ZZZ, "\n") test.write(sub1_yyy, "\n") old_stdout = sys.stdout sys.stdout = OutBuffer() - exp = "Removed " + os.path.join(base, sub1_yyy) + '\n' + \ + exp = "Removed " + os.path.join(base, ZZZ) + "\n" + \ + "Removed " + os.path.join(base, sub1_yyy) + '\n' + \ "Removed directory " + os.path.join(base, 'sub1') + '\n' + \ "Removed " + os.path.join(base, xxx) + '\n' + \ "Removed directory " + base + '\n' SCons.Util.fs_delete(base, remove=0) - assert sys.stdout.buffer == exp + assert sys.stdout.buffer == exp, sys.stdout.buffer assert os.path.exists(sub1_yyy) sys.stdout.buffer = "" |