Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
- Spelling & linting
- Fix error in logging failures
  • Loading branch information
jgfoster committed Jul 18, 2023
commit b8fbddcecf05d12d5e189463a27f991b575bf6dc
4 changes: 2 additions & 2 deletions exe/arduino_ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def display_files(pathname)
# forcibly installs the dependency. Each child dependency logs which parent requested it
#
# @param library_names [Array<String>] the list of libraries to install
# @param on_behalf_of [String] the requestor of a given dependency
# @param on_behalf_of [String] the requester of a given dependency
# @param already_installed [Array<String>] the set of dependencies installed by previous steps
# @return [Array<String>] The list of installed libraries
def install_arduino_library_dependencies_h(library_names, on_behalf_of, already_installed)
Expand Down Expand Up @@ -456,7 +456,7 @@ def perform_unit_tests(cpp_library, file_config)
@log.iputs
compilers.each do |gcc_binary|
# before compiling the tests, build a shared library of everything except the test code
next @log.failure_count += 1 unless build_shared_library(gcc_binary, p, config, cpp_library)
next unless build_shared_library(gcc_binary, p, config, cpp_library)

# now build and run each test using the shared library build above
config.allowable_unittest_files(cpp_library.test_files).each do |unittest_path|
Expand Down
6 changes: 4 additions & 2 deletions lib/arduino_ci/cpp_library.rb
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def test_args(aux_libraries, ci_gcc_config)
# @return [Pathname] path to the compiled test executable
def build_for_test(test_file, gcc_binary)
executable = Pathname.new("#{BUILD_DIR}/#{test_file.basename}.bin").expand_path
if (File.file?("Makefile") and ArduinoCI::Host.os != :windows)
if File.file?("Makefile") && ArduinoCI::Host.os != :windows
# we should already have everything built!
else
File.delete(executable) if File.exist?(executable)
Expand Down Expand Up @@ -540,9 +540,11 @@ def build_shared_library(aux_libraries, gcc_binary, ci_gcc_config)
suffix = OS.windows? ? "dll" : "so"
full_lib_name = "#{BUILD_DIR}/lib#{LIBRARY_NAME}.#{suffix}"
executable = Pathname.new(full_lib_name).expand_path
if (File.file?("Makefile") and ArduinoCI::Host.os != :windows)
if File.file?("Makefile") && ArduinoCI::Host.os != :windows
@last_cmd = " $ make --jobs"
ret = Host.run_and_capture("export ARDUINO_CI=#{CI_CPP_DIR}; make --jobs")
@last_err = ret[:err]
@last_out = ret[:out]
return nil unless ret[:success]
else
File.delete(executable) if File.exist?(executable)
Expand Down