mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Sort all os.listdir and os.walk to keep things more reproducible
This commit is contained in:
@@ -26,14 +26,15 @@ If given, run only the given tests. Otherwise, run all tests.
|
||||
if self.env['tests'] == []:
|
||||
baremetal_source_exts = (self.env['c_ext'], self.env['asm_ext'])
|
||||
paths = []
|
||||
for f in os.listdir(self.env['baremetal_source_dir']):
|
||||
for f in sorted(os.listdir(self.env['baremetal_source_dir'])):
|
||||
path = os.path.join(self.env['baremetal_source_dir'], f)
|
||||
if os.path.isfile(path) and os.path.splitext(path)[1] in baremetal_source_exts:
|
||||
paths.append(path)
|
||||
for root, dirs, files in os.walk(self.env['baremetal_source_arch_dir'], topdown=True):
|
||||
dirs[:] = [d for d in dirs if d != 'interactive']
|
||||
for file in files:
|
||||
path = os.path.join(root, file)
|
||||
for root, dirnames, filenames in os.walk(self.env['baremetal_source_arch_dir'], topdown=True):
|
||||
dirnames[:] = [d for d in dirnames if d != 'interactive']
|
||||
dirnames.sort()
|
||||
for filename in filenames:
|
||||
path = os.path.join(root, filename)
|
||||
if os.path.splitext(path)[1] in baremetal_source_exts:
|
||||
paths.append(path)
|
||||
sources = []
|
||||
|
||||
Reference in New Issue
Block a user