From 90c5504989cc50524ae115b1d1397e11b2d64e98 Mon Sep 17 00:00:00 2001 From: James Foster Date: Tue, 23 Feb 2021 12:02:24 -0800 Subject: [PATCH 1/3] Hide build artifacts. --- lib/arduino_ci/cpp_library.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/arduino_ci/cpp_library.rb b/lib/arduino_ci/cpp_library.rb index 4ad7307f..eb609855 100644 --- a/lib/arduino_ci/cpp_library.rb +++ b/lib/arduino_ci/cpp_library.rb @@ -491,7 +491,10 @@ def test_args(aux_libraries, ci_gcc_config) # @return [Pathname] path to the compiled test executable def build_for_test_with_configuration(test_file, aux_libraries, gcc_binary, ci_gcc_config) base = test_file.basename - executable = Pathname.new("unittest_#{base}.bin").expand_path + # hide build artifacts + build_dir = '.arduino_ci' + Dir.mkdir build_dir unless File.exists?(build_dir) + executable = Pathname.new("#{build_dir}/unittest_#{base}.bin").expand_path File.delete(executable) if File.exist?(executable) arg_sets = [] arg_sets << ["-std=c++0x", "-o", executable.to_s, "-DARDUINO=100"] From 86c8e953a67d4186887bef1f6901c6afd023bed3 Mon Sep 17 00:00:00 2001 From: James Foster Date: Tue, 23 Feb 2021 12:06:01 -0800 Subject: [PATCH 2/3] Add note to CHANGELOG.md. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cac76ad..df675d54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added ### Changed +- Put build artifacts in a separate directory to reduce clutter. ### Deprecated From a516e7c0f691935afb1bce199c70375eda5ca563 Mon Sep 17 00:00:00 2001 From: James Foster Date: Tue, 23 Feb 2021 12:14:29 -0800 Subject: [PATCH 3/3] Reeplace deprecated function call. --- lib/arduino_ci/cpp_library.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/arduino_ci/cpp_library.rb b/lib/arduino_ci/cpp_library.rb index eb609855..cedd3ba2 100644 --- a/lib/arduino_ci/cpp_library.rb +++ b/lib/arduino_ci/cpp_library.rb @@ -493,7 +493,7 @@ def build_for_test_with_configuration(test_file, aux_libraries, gcc_binary, ci_g base = test_file.basename # hide build artifacts build_dir = '.arduino_ci' - Dir.mkdir build_dir unless File.exists?(build_dir) + Dir.mkdir build_dir unless File.exist?(build_dir) executable = Pathname.new("#{build_dir}/unittest_#{base}.bin").expand_path File.delete(executable) if File.exist?(executable) arg_sets = []