Sort all os.listdir and os.walk to keep things more reproducible

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-03-10 00:00:04 +00:00
parent 2e3f4c1484
commit a9160d2217
6 changed files with 21 additions and 16 deletions

View File

@@ -27,13 +27,13 @@ found by searching for the Python test files.
if self.env['arch'] in self.env['crosstool_ng_supported_archs']:
if self.env['tests'] == []:
test_scripts_noext = []
for f in os.listdir(self.env['baremetal_source_dir']):
base, ext = os.path.splitext(f)
for filename in sorted(os.listdir(self.env['baremetal_source_dir'])):
base, ext = os.path.splitext(filename)
if ext == '.py':
test_scripts_noext.append(base)
for root, dirs, files in os.walk(os.path.join(self.env['baremetal_source_dir'], 'arch', self.env['arch'])):
for f in files:
base, ext = os.path.splitext(f)
for root, dirnames, filenames in os.walk(os.path.join(self.env['baremetal_source_dir'], 'arch', self.env['arch'])):
for filename in filenames:
base, ext = os.path.splitext(filename)
if ext == '.py':
full_path = os.path.join(root, base)
relpath = os.path.relpath(full_path, self.env['baremetal_source_dir'])