facter 3.9.6.cfacter.20180612 → 3.11.0.cfacter.20180319

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/ext/facter/facter/CMakeLists.txt +1 -1
  3. data/ext/facter/facter/acceptance/Gemfile +3 -4
  4. data/ext/facter/facter/acceptance/Rakefile +342 -2
  5. data/ext/facter/facter/acceptance/config/aio/options.rb +6 -0
  6. data/ext/facter/facter/acceptance/config/git/options.rb +5 -1
  7. data/ext/facter/facter/acceptance/setup/aio/pre-suite/010_Install.rb +22 -0
  8. data/ext/facter/facter/acceptance/setup/aio/pre-suite/021_InstallAristaModule.rb +12 -0
  9. data/ext/facter/facter/acceptance/setup/aio/pre-suite/022_Remove_LD_PRELOAD.rb +11 -0
  10. data/ext/facter/facter/acceptance/setup/common/00_EnvSetup.rb +64 -0
  11. data/ext/facter/facter/acceptance/setup/common/pre-suite/000-delete-puppet-when-none.rb +11 -0
  12. data/ext/facter/facter/acceptance/setup/git/pre-suite/01_TestSetup.rb +31 -0
  13. data/ext/facter/facter/acceptance/tests/ticket_1238_hostname_fqdn.rb +20 -0
  14. data/ext/facter/facter/lib/CMakeLists.txt +3 -2
  15. data/ext/facter/facter/lib/Doxyfile +1 -1
  16. data/ext/facter/facter/lib/inc/facter/facts/fact.hpp +5 -0
  17. data/ext/facter/facter/lib/inc/internal/facts/aix/networking_resolver.hpp +0 -7
  18. data/ext/facter/facter/lib/inc/internal/facts/freebsd/networking_resolver.hpp +0 -7
  19. data/ext/facter/facter/lib/inc/internal/facts/linux/fips_resolver.hpp +31 -0
  20. data/ext/facter/facter/lib/inc/internal/facts/linux/networking_resolver.hpp +0 -7
  21. data/ext/facter/facter/lib/inc/internal/facts/openbsd/networking_resolver.hpp +0 -7
  22. data/ext/facter/facter/lib/inc/internal/facts/osx/networking_resolver.hpp +0 -7
  23. data/ext/facter/facter/lib/inc/internal/facts/posix/networking_resolver.hpp +0 -7
  24. data/ext/facter/facter/lib/inc/internal/facts/resolvers/fips_resolver.hpp +46 -0
  25. data/ext/facter/facter/lib/inc/internal/facts/resolvers/networking_resolver.hpp +2 -3
  26. data/ext/facter/facter/lib/inc/internal/facts/resolvers/ssh_resolver.hpp +6 -0
  27. data/ext/facter/facter/lib/inc/internal/facts/solaris/networking_resolver.hpp +0 -7
  28. data/ext/facter/facter/lib/schema/facter.yaml +38 -18
  29. data/ext/facter/facter/lib/src/cwrapper.cc +5 -0
  30. data/ext/facter/facter/lib/src/facts/aix/disk_resolver.cc +2 -11
  31. data/ext/facter/facter/lib/src/facts/aix/networking_resolver.cc +0 -5
  32. data/ext/facter/facter/lib/src/facts/freebsd/dmi_resolver.cc +5 -1
  33. data/ext/facter/facter/lib/src/facts/freebsd/networking_resolver.cc +1 -10
  34. data/ext/facter/facter/lib/src/facts/freebsd/virtualization_resolver.cc +1 -4
  35. data/ext/facter/facter/lib/src/facts/linux/collection.cc +2 -0
  36. data/ext/facter/facter/lib/src/facts/linux/fips_resolver.cc +31 -0
  37. data/ext/facter/facter/lib/src/facts/linux/networking_resolver.cc +1 -10
  38. data/ext/facter/facter/lib/src/facts/openbsd/networking_resolver.cc +1 -10
  39. data/ext/facter/facter/lib/src/facts/osx/networking_resolver.cc +1 -10
  40. data/ext/facter/facter/lib/src/facts/posix/networking_resolver.cc +2 -3
  41. data/ext/facter/facter/lib/src/facts/posix/ssh_resolver.cc +3 -2
  42. data/ext/facter/facter/lib/src/facts/resolvers/fips_resolver.cc +23 -0
  43. data/ext/facter/facter/lib/src/facts/resolvers/networking_resolver.cc +7 -23
  44. data/ext/facter/facter/lib/src/facts/resolvers/ssh_resolver.cc +1 -0
  45. data/ext/facter/facter/lib/src/facts/solaris/networking_resolver.cc +0 -5
  46. data/ext/facter/facter/lib/tests/facts/resolvers/ssh_resolver.cc +8 -1
  47. data/ext/facter/facter/lib/tests/facts/schema.cc +17 -0
  48. data/ext/facter/facter/locales/FACTER.pot +2 -23
  49. data/ext/facter/leatherman/CHANGELOG.md +16 -9
  50. data/ext/facter/leatherman/CMakeLists.txt +1 -2
  51. data/ext/facter/leatherman/appveyor.yml +26 -19
  52. data/ext/facter/leatherman/catch/CMakeLists.txt +1 -1
  53. data/ext/facter/leatherman/curl/tests/client_test.cc +396 -398
  54. data/ext/facter/leatherman/curl/tests/mock_curl.cc +2 -0
  55. data/ext/facter/leatherman/curl/tests/request_test.cc +66 -68
  56. data/ext/facter/leatherman/curl/tests/response_test.cc +50 -52
  57. data/ext/facter/leatherman/dynamic_library/tests/dynamic_library_tests.cc +71 -75
  58. data/ext/facter/leatherman/execution/src/execution.cc +3 -0
  59. data/ext/facter/leatherman/execution/src/posix/execution.cc +5 -6
  60. data/ext/facter/leatherman/execution/src/windows/execution.cc +2 -0
  61. data/ext/facter/leatherman/execution/tests/windows/execution.cc +4 -2
  62. data/ext/facter/leatherman/file_util/tests/directory_utils_test.cc +66 -68
  63. data/ext/facter/leatherman/file_util/tests/file_utils_test.cc +175 -177
  64. data/ext/facter/leatherman/json_container/inc/leatherman/json_container/json_container.hpp +7 -0
  65. data/ext/facter/leatherman/json_container/src/json_container.cc +10 -1
  66. data/ext/facter/leatherman/json_container/tests/json_container_test.cc +152 -8
  67. data/ext/facter/leatherman/locale/CMakeLists.txt +0 -7
  68. data/ext/facter/leatherman/locales/leatherman.pot +8 -13
  69. data/ext/facter/leatherman/logging/src/logging.cc +2 -0
  70. data/ext/facter/leatherman/util/tests/timer.cc +1 -3
  71. data/ext/facter/leatherman/vendor/Catch-1.10.0.zip +0 -0
  72. data/ext/facter/leatherman/vendor/nowide/doc/Doxyfile +4 -4
  73. data/ext/facter/leatherman/vendor/nowide/doc/LICENSE_1_0.txt +23 -0
  74. data/ext/facter/leatherman/vendor/nowide/doc/main.txt +62 -54
  75. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/convert.hpp +16 -16
  76. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/cstdio.hpp +4 -4
  77. data/ext/facter/leatherman/vendor/nowide/include/boost/nowide/utf8_codecvt.hpp +1 -1
  78. data/ext/facter/leatherman/vendor/nowide/src/iostream.cpp +32 -30
  79. data/ext/facter/leatherman/vendor/nowide/standalone/convert +6 -6
  80. data/ext/facter/leatherman/vendor/nowide/standalone/encoding_utf.hpp +1 -1
  81. data/ext/facter/leatherman/vendor/nowide/standalone/run_convert_and_build.sh +1 -3
  82. metadata +15 -6
  83. data/ext/facter/leatherman/cmake/FindICU.cmake +0 -690
  84. data/ext/facter/leatherman/scripts/travis_target.sh +0 -79
  85. data/ext/facter/leatherman/vendor/catch-1.4.0.zip +0 -0
@@ -106,6 +106,8 @@ CURLcode curl_easy_setopt(CURL *handle, CURLoption option, ...)
106
106
  {
107
107
  auto h = reinterpret_cast<curl_impl*>(handle);
108
108
  va_list vl;
109
+ #pragma clang diagnostic push
110
+ #pragma clang diagnostic ignored "-Wvarargs"
109
111
  va_start(vl, option);
110
112
  #pragma clang diagnostic pop
111
113
 
@@ -4,84 +4,82 @@
4
4
  #include <leatherman/curl/request.hpp>
5
5
 
6
6
  using namespace std;
7
+ using namespace leatherman::curl;
7
8
 
8
- namespace leatherman { namespace curl {
9
+ struct mock_client : client {
10
+ curl_handle const& get_handle() { return client::get_handle(); }
11
+ };
9
12
 
10
- struct mock_client : client {
11
- curl_handle const& get_handle() { return client::get_handle(); }
12
- };
13
+ TEST_CASE("curl::request") {
14
+ request test_request {"http://valid.com"};
13
15
 
14
- TEST_CASE("curl::request") {
15
- request test_request {"http://valid.com"};
16
-
17
- SECTION("Headers should be addable and retrievable from the request") {
18
- test_request.add_header("header_name", "header_value");
19
- auto header = test_request.header("header_name");
20
- REQUIRE(header);
21
- REQUIRE(*(header) == "header_value");
22
- }
16
+ SECTION("Headers should be addable and retrievable from the request") {
17
+ test_request.add_header("header_name", "header_value");
18
+ auto header = test_request.header("header_name");
19
+ REQUIRE(header);
20
+ REQUIRE(*(header) == "header_value");
21
+ }
23
22
 
24
- SECTION("Headers should be removable from the request") {
25
- test_request.add_header("header_name", "header_value");
26
- test_request.remove_header("header_name");
27
- auto header = test_request.header("header_name");
28
- REQUIRE(header == nullptr);
29
- }
23
+ SECTION("Headers should be removable from the request") {
24
+ test_request.add_header("header_name", "header_value");
25
+ test_request.remove_header("header_name");
26
+ auto header = test_request.header("header_name");
27
+ REQUIRE(header == nullptr);
28
+ }
30
29
 
31
- SECTION("Headers should be enumerable") {
32
- int i = 0;
33
- string expected_name, expected_value;
34
- test_request.add_header("header_0", "header_value_0");
35
- test_request.add_header("header_1", "header_value_1");
36
- test_request.add_header("header_2", "header_value_2");
30
+ SECTION("Headers should be enumerable") {
31
+ int i = 0;
32
+ string expected_name, expected_value;
33
+ test_request.add_header("header_0", "header_value_0");
34
+ test_request.add_header("header_1", "header_value_1");
35
+ test_request.add_header("header_2", "header_value_2");
37
36
 
38
- test_request.each_header([&](string const& name, string const& value) {
39
- expected_name = "header_" + to_string(i);
40
- expected_value = "header_value_" + to_string(i);
41
- REQUIRE(name == expected_name);
42
- REQUIRE(value == expected_value);
43
- ++i;
44
- return true;
45
- });
46
- }
37
+ test_request.each_header([&](string const& name, string const& value) {
38
+ expected_name = "header_" + to_string(i);
39
+ expected_value = "header_value_" + to_string(i);
40
+ REQUIRE(name == expected_name);
41
+ REQUIRE(value == expected_value);
42
+ ++i;
43
+ return true;
44
+ });
45
+ }
47
46
 
48
- SECTION("A cookie should be retrievable by name") {
49
- test_request.add_cookie("cookie_0", "cookie_val_0");
50
- test_request.add_cookie("cookie_1", "cookie_val_1");
51
- REQUIRE(*(test_request.cookie("cookie_0")) == "cookie_val_0");
52
- }
47
+ SECTION("A cookie should be retrievable by name") {
48
+ test_request.add_cookie("cookie_0", "cookie_val_0");
49
+ test_request.add_cookie("cookie_1", "cookie_val_1");
50
+ REQUIRE(*(test_request.cookie("cookie_0")) == "cookie_val_0");
51
+ }
53
52
 
54
- SECTION("Cookies should be enumerable") {
55
- int i = 0;
56
- string expected_name, expected_value;
57
- test_request.add_cookie("cookie_0", "cookie_value_0");
58
- test_request.add_cookie("cookie_1", "cookie_value_1");
59
- test_request.add_cookie("cookie_2", "cookie_value_2");
53
+ SECTION("Cookies should be enumerable") {
54
+ int i = 0;
55
+ string expected_name, expected_value;
56
+ test_request.add_cookie("cookie_0", "cookie_value_0");
57
+ test_request.add_cookie("cookie_1", "cookie_value_1");
58
+ test_request.add_cookie("cookie_2", "cookie_value_2");
60
59
 
61
- test_request.each_cookie([&](string const& name, string const& value) {
62
- expected_name = "cookie_" + to_string(i);
63
- expected_value = "cookie_value_" + to_string(i);
64
- REQUIRE(name == expected_name);
65
- REQUIRE(value == expected_value);
66
- ++i;
67
- return true;
68
- });
69
- }
60
+ test_request.each_cookie([&](string const& name, string const& value) {
61
+ expected_name = "cookie_" + to_string(i);
62
+ expected_value = "cookie_value_" + to_string(i);
63
+ REQUIRE(name == expected_name);
64
+ REQUIRE(value == expected_value);
65
+ ++i;
66
+ return true;
67
+ });
68
+ }
70
69
 
71
- SECTION("Request body should be addable and retrievable") {
72
- test_request.body("Hello, I am a request body!", "message");
73
- auto body = test_request.body();
74
- REQUIRE(body == "Hello, I am a request body!");
75
- }
70
+ SECTION("Request body should be addable and retrievable") {
71
+ test_request.body("Hello, I am a request body!", "message");
72
+ auto body = test_request.body();
73
+ REQUIRE(body == "Hello, I am a request body!");
74
+ }
76
75
 
77
- SECTION("Overall request timeout should be configurable and retrievable") {
78
- test_request.timeout(100);
79
- REQUIRE(test_request.timeout() == 100);
80
- }
76
+ SECTION("Overall request timeout should be configurable and retrievable") {
77
+ test_request.timeout(100);
78
+ REQUIRE(test_request.timeout() == 100);
79
+ }
81
80
 
82
- SECTION("Connection timeout should be configurable and retrievable") {
83
- test_request.connection_timeout(100);
84
- REQUIRE(test_request.connection_timeout() == 100);
85
- }
81
+ SECTION("Connection timeout should be configurable and retrievable") {
82
+ test_request.connection_timeout(100);
83
+ REQUIRE(test_request.connection_timeout() == 100);
86
84
  }
87
- }}
85
+ }
@@ -4,57 +4,55 @@
4
4
  #include <leatherman/curl/request.hpp>
5
5
 
6
6
  using namespace std;
7
+ using namespace leatherman::curl;
7
8
 
8
- namespace leatherman { namespace curl {
9
-
10
- struct mock_client : client {
11
- curl_handle const& get_handle() { return client::get_handle(); }
12
- };
13
-
14
- TEST_CASE("curl::response") {
15
- response test_response;
16
-
17
- SECTION("Headers should be addable and retrievable from the response") {
18
- test_response.add_header("header_name", "header_value");
19
- auto header = test_response.header("header_name");
20
- REQUIRE(header);
21
- REQUIRE(*(header) == "header_value");
22
- }
23
-
24
- SECTION("Headers should be removable from the response") {
25
- test_response.add_header("header_name", "header_value");
26
- test_response.remove_header("header_name");
27
- auto header = test_response.header("header_name");
28
- REQUIRE(header == nullptr);
29
- }
30
-
31
- SECTION("Headers should be enumerable") {
32
- int i = 0;
33
- string expected_name, expected_value;
34
- test_response.add_header("header_0", "header_value_0");
35
- test_response.add_header("header_1", "header_value_1");
36
- test_response.add_header("header_2", "header_value_2");
37
-
38
- test_response.each_header([&](string const& name, string const& value) {
39
- expected_name = "header_" + to_string(i);
40
- expected_value = "header_value_" + to_string(i);
41
- REQUIRE(name == expected_name);
42
- REQUIRE(value == expected_value);
43
- ++i;
44
- return true;
45
- });
46
- }
47
-
48
- SECTION("Response body should be addable and retrievable") {
49
- test_response.body("Hello, I am a response body!");
50
- auto body = test_response.body();
51
- REQUIRE(body == "Hello, I am a response body!");
52
- }
53
-
54
- SECTION("Status code should be addable and retrievable") {
55
- test_response.status_code(200);
56
- auto code = test_response.status_code();
57
- REQUIRE(code == 200);
58
- }
9
+ struct mock_client : client {
10
+ curl_handle const& get_handle() { return client::get_handle(); }
11
+ };
12
+
13
+ TEST_CASE("curl::response") {
14
+ response test_response;
15
+
16
+ SECTION("Headers should be addable and retrievable from the response") {
17
+ test_response.add_header("header_name", "header_value");
18
+ auto header = test_response.header("header_name");
19
+ REQUIRE(header);
20
+ REQUIRE(*(header) == "header_value");
21
+ }
22
+
23
+ SECTION("Headers should be removable from the response") {
24
+ test_response.add_header("header_name", "header_value");
25
+ test_response.remove_header("header_name");
26
+ auto header = test_response.header("header_name");
27
+ REQUIRE(header == nullptr);
28
+ }
29
+
30
+ SECTION("Headers should be enumerable") {
31
+ int i = 0;
32
+ string expected_name, expected_value;
33
+ test_response.add_header("header_0", "header_value_0");
34
+ test_response.add_header("header_1", "header_value_1");
35
+ test_response.add_header("header_2", "header_value_2");
36
+
37
+ test_response.each_header([&](string const& name, string const& value) {
38
+ expected_name = "header_" + to_string(i);
39
+ expected_value = "header_value_" + to_string(i);
40
+ REQUIRE(name == expected_name);
41
+ REQUIRE(value == expected_value);
42
+ ++i;
43
+ return true;
44
+ });
45
+ }
46
+
47
+ SECTION("Response body should be addable and retrievable") {
48
+ test_response.body("Hello, I am a response body!");
49
+ auto body = test_response.body();
50
+ REQUIRE(body == "Hello, I am a response body!");
51
+ }
52
+
53
+ SECTION("Status code should be addable and retrievable") {
54
+ test_response.status_code(200);
55
+ auto code = test_response.status_code();
56
+ REQUIRE(code == 200);
59
57
  }
60
- }}
58
+ }
@@ -2,97 +2,93 @@
2
2
  #include <leatherman/dynamic_library/dynamic_library.hpp>
3
3
  #include "fixtures.hpp"
4
4
 
5
- namespace leatherman { namespace dynamic_library {
5
+ using namespace leatherman::dynamic_library;
6
6
 
7
+ std::string const lib_path = TEST_LIB_DIRECTORY + std::string("/libtest.so");
8
+ std::string const lib_path2 = TEST_LIB_DIRECTORY + std::string("/libtest1.so");
7
9
 
8
- std::string const lib_path = TEST_LIB_DIRECTORY + std::string("/libtest.so");
9
- std::string const lib_path2 = TEST_LIB_DIRECTORY + std::string("/libtest1.so");
10
-
11
-
12
- TEST_CASE("dynamic_library::load and dynamic_library::close", "[dyn-lib]") {
13
- SECTION("should not be loaded by default") {
14
- dynamic_library lib;
15
- REQUIRE_FALSE(lib.loaded());
16
- }
17
-
18
- SECTION("should load library from path, then close it"){
19
- dynamic_library lib;
20
- REQUIRE(lib.load(lib_path));
21
- REQUIRE(lib.loaded());
22
- REQUIRE(lib.first_load());
23
- lib.close();
24
- REQUIRE_FALSE(lib.loaded());
25
- }
26
-
27
- SECTION("should fail to load a nonexistent library") {
28
- dynamic_library lib;
29
- REQUIRE_FALSE(lib.load("no_such_library"));
30
- }
10
+ TEST_CASE("dynamic_library::load and dynamic_library::close", "[dyn-lib]") {
11
+ SECTION("should not be loaded by default") {
12
+ dynamic_library lib;
13
+ REQUIRE_FALSE(lib.loaded());
31
14
  }
32
15
 
33
- TEST_CASE("dynamic_library::find_symbol", "[dyn-lib]"){
16
+ SECTION("should load library from path, then close it"){
34
17
  dynamic_library lib;
35
18
  REQUIRE(lib.load(lib_path));
19
+ REQUIRE(lib.loaded());
20
+ REQUIRE(lib.first_load());
21
+ lib.close();
22
+ REQUIRE_FALSE(lib.loaded());
23
+ }
36
24
 
37
- SECTION("should fail to find nonexistent symbol") {
38
- REQUIRE_FALSE(lib.find_symbol("not_here"));
39
- REQUIRE_THROWS(lib.find_symbol("not_here", true));
40
- }
25
+ SECTION("should fail to load a nonexistent library") {
26
+ dynamic_library lib;
27
+ REQUIRE_FALSE(lib.load("no_such_library"));
28
+ }
29
+ }
41
30
 
42
- SECTION("should find library function") {
43
- REQUIRE(lib.find_symbol("hello"));
44
- }
31
+ TEST_CASE("dynamic_library::find_symbol", "[dyn-lib]"){
32
+ dynamic_library lib;
33
+ REQUIRE(lib.load(lib_path));
45
34
 
46
- SECTION("should find aliased symbol"){
47
- dynamic_library lib2;
48
- REQUIRE(lib2.load(lib_path2));
49
- REQUIRE(lib2.find_symbol("not_here", false, "goodbye"));
50
- }
35
+ SECTION("should fail to find nonexistent symbol") {
36
+ REQUIRE_FALSE(lib.find_symbol("not_here"));
37
+ REQUIRE_THROWS(lib.find_symbol("not_here", true));
51
38
  }
52
39
 
53
- TEST_CASE("dynamic_library::dyanmic_library(dynamic_library && other)", "[dyn-lib]") {
54
- SECTION("should move library to new variable") {
55
- dynamic_library lib;
56
- REQUIRE(lib.load(lib_path));
57
- REQUIRE(lib.loaded());
58
- dynamic_library lib2 = std::move(lib);
59
- REQUIRE(lib2.loaded());
60
- REQUIRE(lib2.name() == lib_path);
61
- REQUIRE_FALSE(lib.loaded());
62
- }
63
- }
40
+ SECTION("should find library function") {
41
+ REQUIRE(lib.find_symbol("hello"));
42
+ }
43
+
44
+ SECTION("should find aliased symbol"){
45
+ dynamic_library lib2;
46
+ REQUIRE(lib2.load(lib_path2));
47
+ REQUIRE(lib2.find_symbol("not_here", false, "goodbye"));
48
+ }
49
+ }
50
+
51
+ TEST_CASE("dynamic_library::dyanmic_library(dynamic_library && other)", "[dyn-lib]") {
52
+ SECTION("should move library to new variable") {
53
+ dynamic_library lib;
54
+ REQUIRE(lib.load(lib_path));
55
+ REQUIRE(lib.loaded());
56
+ dynamic_library lib2 = std::move(lib);
57
+ REQUIRE(lib2.loaded());
58
+ REQUIRE(lib2.name() == lib_path);
59
+ REQUIRE_FALSE(lib.loaded());
60
+ }
61
+ }
64
62
 
65
63
  #ifdef _WIN32
66
- TEST_CASE("dynamic_library::find_by_pattern", "[dyn-lib]"){
67
- SECTION("should fail to find a missing library"){
68
- REQUIRE_FALSE(dynamic_library::find_by_pattern("libtest1").loaded());
69
- }
64
+ TEST_CASE("dynamic_library::find_by_pattern", "[dyn-lib]"){
65
+ SECTION("should fail to find a missing library"){
66
+ REQUIRE_FALSE(dynamic_library::find_by_pattern("libtest1").loaded());
67
+ }
70
68
 
71
- SECTION("should find a library matching a pattern"){
72
- dynamic_library lib;
73
- lib.load(lib_path);
74
- REQUIRE_FALSE(dynamic_library::find_by_pattern("libtest1").loaded());
75
- dynamic_library lib2;
76
- lib2.load(lib_path2);
77
- REQUIRE(dynamic_library::find_by_pattern("libtest1").loaded());
78
- }
69
+ SECTION("should find a library matching a pattern"){
70
+ dynamic_library lib;
71
+ lib.load(lib_path);
72
+ REQUIRE_FALSE(dynamic_library::find_by_pattern("libtest1").loaded());
73
+ dynamic_library lib2;
74
+ lib2.load(lib_path2);
75
+ REQUIRE(dynamic_library::find_by_pattern("libtest1").loaded());
79
76
  }
77
+ }
80
78
  #else
81
- TEST_CASE("dynamic_library::find_by_symbol", "[dyn-lib]"){
82
- SECTION("should fail to find a missing symbol"){
83
- REQUIRE_FALSE(dynamic_library::find_by_symbol("no_such_symbol").loaded());
84
- }
79
+ TEST_CASE("dynamic_library::find_by_symbol", "[dyn-lib]"){
80
+ SECTION("should fail to find a missing symbol"){
81
+ REQUIRE_FALSE(dynamic_library::find_by_symbol("no_such_symbol").loaded());
82
+ }
85
83
 
86
- SECTION("should find a library with the given symbol"){
87
- dynamic_library lib;
88
- REQUIRE(lib.load(lib_path));
89
- REQUIRE_FALSE(dynamic_library::find_by_symbol("goodbye").loaded());
90
- dynamic_library lib2;
91
- REQUIRE(lib2.load(lib_path2, true));
92
- REQUIRE(lib2.find_symbol("goodbye"));
93
- REQUIRE(dynamic_library::find_by_symbol("goodbye").loaded());
94
- }
84
+ SECTION("should find a library with the given symbol"){
85
+ dynamic_library lib;
86
+ REQUIRE(lib.load(lib_path));
87
+ REQUIRE_FALSE(dynamic_library::find_by_symbol("goodbye").loaded());
88
+ dynamic_library lib2;
89
+ REQUIRE(lib2.load(lib_path2, true));
90
+ REQUIRE(lib2.find_symbol("goodbye"));
91
+ REQUIRE(dynamic_library::find_by_symbol("goodbye").loaded());
95
92
  }
93
+ }
96
94
  #endif
97
-
98
- }} // namespace leatherman::dynamic_library
@@ -233,6 +233,7 @@ namespace leatherman { namespace execution {
233
233
  vector<string> const& arguments,
234
234
  string const& input,
235
235
  map<string, string> const& environment,
236
+ // cppcheck-suppress passedByValue
236
237
  std::function<void(size_t)> pid_callback,
237
238
  uint32_t timeout,
238
239
  option_set<execution_options> const& options)
@@ -258,12 +259,14 @@ namespace leatherman { namespace execution {
258
259
  }
259
260
 
260
261
  result execute(
262
+ // cppcheck-suppress funcArgOrderDifferent
261
263
  std::string const& file,
262
264
  std::vector<std::string> const& arguments,
263
265
  std::string const& input,
264
266
  std::string const& out_file,
265
267
  std::string const& err_file,
266
268
  std::map<std::string, std::string> const& environment,
269
+ // cppcheck-suppress passedByValue
267
270
  std::function<void(size_t)> pid_callback,
268
271
  uint32_t timeout,
269
272
  boost::optional<fs::perms> perms,