Skip to content

Commit 614677a

Browse files
committed
Run tests [files] alphabetically
1 parent 23b20f0 commit 614677a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
### Added
99

1010
### Changed
11+
- Unit tests and examples are now executed alphabetically by filename
1112

1213
### Deprecated
1314

lib/arduino_ci/arduino_cmd.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def library_examples(installed_library_path)
319319
proj_file = example_path + e + "#{e}.ino"
320320
proj_file.exist? ? proj_file.to_s : nil
321321
end
322-
files.reject(&:nil?)
322+
files.reject(&:nil?).sort_by(&:to_s)
323323
end
324324
end
325325
end

lib/arduino_ci/cpp_library.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ def cpp_files_in(some_dir)
109109
real = some_dir.realpath
110110
files = Find.find(real).map { |p| Pathname.new(p) }.reject(&:directory?)
111111
cpp = files.select { |path| CPP_EXTENSIONS.include?(path.extname.downcase) }
112-
cpp.reject { |path| path.basename.to_s.start_with?(".") } # ignore hidden
112+
not_hidden = cpp.reject { |path| path.basename.to_s.start_with?(".") }
113+
not_hidden.sort_by(&:to_s)
113114
end
114115

115116
# CPP files that are part of the project library under test

0 commit comments

Comments
 (0)