summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/testutils/integration.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/testutils/integration.py b/tests/testutils/integration.py
index a6fa92871..b2cf9fba4 100644
--- a/tests/testutils/integration.py
+++ b/tests/testutils/integration.py
@@ -6,6 +6,11 @@ from buildstream import _yaml
# Return a list of files relative to the given directory
def walk_dir(root):
for dirname, dirnames, filenames in os.walk(root):
+ # ensure consistent traversal order, needed for consistent
+ # handling of symlinks.
+ dirnames.sort()
+ filenames.sort()
+
# print path to all subdirectories first.
for subdirname in dirnames:
yield os.path.join(dirname, subdirname)[len(root):]