File tree Expand file tree Collapse file tree 17 files changed +137
-12
lines changed
aws-cpp-sdk-cloudfront-integration-tests
aws-cpp-sdk-cognitoidentity-integration-tests
aws-cpp-sdk-dynamodb-integration-tests
aws-cpp-sdk-identity-management-tests
aws-cpp-sdk-lambda-integration-tests
aws-cpp-sdk-redshift-integration-tests
aws-cpp-sdk-s3-integration-tests
aws-cpp-sdk-sqs-integration-tests
aws-cpp-sdk-transfer-tests
include/aws/testing/platform Expand file tree Collapse file tree 17 files changed +137
-12
lines changed Original file line number Diff line number Diff line change 15
15
16
16
#include < aws/external/gtest.h>
17
17
#include < aws/core/Aws.h>
18
+ #include < aws/testing/platform/PlatformTesting.h>
18
19
19
20
int main (int argc, char ** argv)
20
21
{
21
22
Aws::SDKOptions options;
23
+
24
+ Aws::Testing::InitPlatformTest (options);
25
+
22
26
options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
23
27
Aws::InitAPI (options);
24
28
::testing::InitGoogleTest (&argc, argv);
25
29
int exitCode = RUN_ALL_TESTS ();
26
30
Aws::ShutdownAPI (options);
31
+
32
+
33
+ Aws::Testing::ShutdownPlatformTest (options);
27
34
return exitCode;
28
35
}
29
36
Original file line number Diff line number Diff line change 15
15
16
16
#include < aws/external/gtest.h>
17
17
#include < aws/core/Aws.h>
18
+ #include < aws/testing/platform/PlatformTesting.h>
18
19
19
20
int main (int argc, char ** argv)
20
21
{
21
22
Aws::SDKOptions options;
23
+
24
+ Aws::Testing::InitPlatformTest (options);
25
+
22
26
options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
23
27
Aws::InitAPI (options);
24
28
::testing::InitGoogleTest (&argc, argv);
25
29
int exitCode = RUN_ALL_TESTS ();
26
30
Aws::ShutdownAPI (options);
31
+
32
+
33
+ Aws::Testing::ShutdownPlatformTest (options);
27
34
return exitCode;
28
35
}
Original file line number Diff line number Diff line change 18
18
#include < aws/core/http/HttpClientFactory.h>
19
19
#include < aws/core/Aws.h>
20
20
#include < aws/testing/TestingEnvironment.h>
21
+ #include < aws/testing/platform/PlatformTesting.h>
21
22
22
23
int main (int argc, char ** argv)
23
24
{
25
+
24
26
Aws::Testing::RedirectHomeToTempIfAppropriate ();
25
27
26
28
Aws::SDKOptions options;
29
+
30
+ Aws::Testing::InitPlatformTest (options);
31
+
27
32
Aws::InitAPI (options);
28
33
::testing::InitGoogleTest (&argc, argv);
29
34
int retVal = RUN_ALL_TESTS ();
30
35
Aws::ShutdownAPI (options);
36
+
37
+ Aws::Testing::ShutdownPlatformTest (options);
38
+
31
39
return retVal;
32
40
}
Original file line number Diff line number Diff line change @@ -316,6 +316,11 @@ endif(MSVC)
316
316
317
317
set (Core_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR} /include/" )
318
318
319
+ if (PLATFORM_CUSTOM )
320
+ add_custom_core_include_directories (CORE_CUSTOM_INCLUDE )
321
+ SET (Core_INCLUDES ${Core_INCLUDES} ${CORE_CUSTOM_INCLUDE} )
322
+ endif ()
323
+
319
324
include_directories (${Core_INCLUDES} )
320
325
321
326
if (NOT PLATFORM_CUSTOM )
@@ -344,6 +349,10 @@ if(ENABLE_OPENSSL_ENCRYPTION AND BUILD_OPENSSL)
344
349
add_dependencies (aws-cpp-sdk-core OPENSSL )
345
350
endif ()
346
351
352
+ if (PLATFORM_CUSTOM )
353
+ add_custom_core_libraries ()
354
+ endif ()
355
+
347
356
target_include_directories (aws-cpp-sdk-core PUBLIC
348
357
$< BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include>
349
358
$< INSTALL_INTERFACE:include> )
Original file line number Diff line number Diff line change 15
15
16
16
#include < aws/external/gtest.h>
17
17
#include < aws/core/Aws.h>
18
+ #include < aws/testing/platform/PlatformTesting.h>
18
19
19
20
int main (int argc, char ** argv)
20
21
{
21
22
Aws::SDKOptions options;
23
+
24
+ Aws::Testing::InitPlatformTest (options);
25
+
22
26
options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
23
27
Aws::InitAPI (options);
24
28
::testing::InitGoogleTest (&argc, argv);
25
29
int exitCode = RUN_ALL_TESTS ();
26
30
Aws::ShutdownAPI (options);
31
+
32
+ Aws::Testing::ShutdownPlatformTest (options);
27
33
return exitCode;
28
34
}
29
35
Original file line number Diff line number Diff line change 16
16
#include < aws/external/gtest.h>
17
17
#include < aws/testing/TestingEnvironment.h>
18
18
#include < aws/core/Aws.h>
19
+ #include < aws/testing/platform/PlatformTesting.h>
19
20
20
21
int main (int argc, char ** argv)
21
22
{
22
23
Aws::Testing::RedirectHomeToTempIfAppropriate ();
23
24
24
25
Aws::SDKOptions options;
26
+
27
+ Aws::Testing::InitPlatformTest (options);
28
+
29
+ options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
25
30
Aws::InitAPI (options);
26
31
::testing::InitGoogleTest (&argc, argv);
27
- int result = RUN_ALL_TESTS ();
32
+ int exitCode = RUN_ALL_TESTS ();
28
33
Aws::ShutdownAPI (options);
29
34
30
- return result;
31
- }
35
+ Aws::Testing::ShutdownPlatformTest (options);
36
+ return exitCode;
37
+ }
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ include_directories(${AWS_LAMBDA_INTEGRATION_TEST_APPLICATION_INCLUDES})
28
28
29
29
if (PLATFORM_ANDROID )
30
30
add_definitions (-DRESOURCES_DIR= "resources" )
31
+ elseif (COMMAND add_custom_lambda_resources_directory_definition )
32
+ add_custom_lambda_resources_directory_definition ()
31
33
else ()
32
34
add_definitions (-DRESOURCES_DIR= "${CMAKE_CURRENT_SOURCE_DIR} /resources" )
33
35
endif ()
@@ -46,3 +48,7 @@ endif()
46
48
47
49
target_link_libraries (runLambdaIntegrationTests aws-cpp-sdk-kinesis aws-cpp-sdk-lambda aws-cpp-sdk-cognito-identity aws-cpp-sdk-access-management aws-cpp-sdk-iam testing-resources )
48
50
copyDlls (runLambdaIntegrationTests aws-cpp-sdk-core aws-cpp-sdk-kinesis aws-cpp-sdk-lambda aws-cpp-sdk-cognito-identity aws-cpp-sdk-access-management aws-cpp-sdk-iam testing-resources )
51
+
52
+ if (COMMAND copy_lambda_testing_resources )
53
+ copy_lambda_testing_resources ()
54
+ endif ()
Original file line number Diff line number Diff line change 15
15
16
16
#include < aws/external/gtest.h>
17
17
#include < aws/core/Aws.h>
18
+ #include < aws/testing/platform/PlatformTesting.h>
18
19
19
20
int main (int argc, char ** argv)
20
21
{
21
22
Aws::SDKOptions options;
23
+
24
+ Aws::Testing::InitPlatformTest (options);
25
+
22
26
options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
23
27
Aws::InitAPI (options);
24
28
::testing::InitGoogleTest (&argc, argv);
25
29
int exitCode = RUN_ALL_TESTS ();
26
30
Aws::ShutdownAPI (options);
31
+
32
+ Aws::Testing::ShutdownPlatformTest (options);
27
33
return exitCode;
28
34
}
29
35
Original file line number Diff line number Diff line change 15
15
16
16
#include < aws/external/gtest.h>
17
17
#include < aws/core/Aws.h>
18
+ #include < aws/testing/platform/PlatformTesting.h>
18
19
19
20
int main (int argc, char ** argv)
20
21
{
21
22
Aws::SDKOptions options;
23
+
24
+ Aws::Testing::InitPlatformTest (options);
25
+
22
26
options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
23
27
Aws::InitAPI (options);
24
28
::testing::InitGoogleTest (&argc, argv);
25
- int exitCode = RUN_ALL_TESTS ();
29
+ int exitCode = RUN_ALL_TESTS ();
26
30
Aws::ShutdownAPI (options);
31
+
32
+ Aws::Testing::ShutdownPlatformTest (options);
27
33
return exitCode;
28
34
}
29
35
Original file line number Diff line number Diff line change 15
15
16
16
#include < aws/external/gtest.h>
17
17
#include < aws/core/Aws.h>
18
+ #include < aws/testing/platform/PlatformTesting.h>
18
19
19
20
int main (int argc, char ** argv)
20
21
{
21
22
Aws::SDKOptions options;
23
+
24
+ Aws::Testing::InitPlatformTest (options);
25
+
22
26
options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
23
27
Aws::InitAPI (options);
24
28
::testing::InitGoogleTest (&argc, argv);
25
29
int exitCode = RUN_ALL_TESTS ();
26
30
Aws::ShutdownAPI (options);
31
+
32
+ Aws::Testing::ShutdownPlatformTest (options);
27
33
return exitCode;
28
34
}
29
35
Original file line number Diff line number Diff line change 15
15
16
16
#include < aws/external/gtest.h>
17
17
#include < aws/core/Aws.h>
18
+ #include < aws/testing/platform/PlatformTesting.h>
18
19
19
20
int main (int argc, char ** argv)
20
21
{
21
22
Aws::SDKOptions options;
23
+
24
+ Aws::Testing::InitPlatformTest (options);
25
+
22
26
options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
23
27
Aws::InitAPI (options);
24
28
::testing::InitGoogleTest (&argc, argv);
25
29
int exitCode = RUN_ALL_TESTS ();
26
30
Aws::ShutdownAPI (options);
31
+
32
+ Aws::Testing::ShutdownPlatformTest (options);
27
33
return exitCode;
28
34
}
29
35
Original file line number Diff line number Diff line change 15
15
16
16
#include < aws/external/gtest.h>
17
17
#include < aws/core/Aws.h>
18
+ #include < aws/testing/platform/PlatformTesting.h>
18
19
19
20
int main (int argc, char ** argv)
20
21
{
21
22
Aws::SDKOptions options;
23
+
24
+ Aws::Testing::InitPlatformTest (options);
25
+
22
26
options.loggingOptions .logLevel = Aws::Utils::Logging::LogLevel::Trace;
23
27
Aws::InitAPI (options);
24
28
::testing::InitGoogleTest (&argc, argv);
25
29
int exitCode = RUN_ALL_TESTS ();
26
30
Aws::ShutdownAPI (options);
31
+
32
+ Aws::Testing::ShutdownPlatformTest (options);
27
33
return exitCode;
28
34
}
29
35
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ set(INCLUDES
74
74
"${CORE_DIR} /include/"
75
75
)
76
76
77
+ if (PLATFORM_CUSTOM )
78
+ add_custom_core_include_directories (CUSTOM_INCLUDE )
79
+ set (INCLUDES ${INCLUDES} ${CUSTOM_INCLUDE} )
80
+ endif ()
81
+
77
82
include_directories (${INCLUDES} )
78
83
79
84
if (USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS )
@@ -87,16 +92,12 @@ endif()
87
92
88
93
add_library (testing-resources ${LIBTYPE} ${TestingResources_SRC} )
89
94
95
+ if (PLATFORM_CUSTOM )
96
+ add_custom_testing_target_compile_definitions ()
97
+ endif ()
98
+
90
99
target_include_directories (testing-resources PUBLIC
91
100
$< BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include>
92
101
$< INSTALL_INTERFACE:include> )
93
102
target_link_libraries (testing-resources aws-cpp-sdk-core )
94
103
95
- if (COMMAND add_custom_testing_link_libraries )
96
- add_custom_testing_link_libraries ()
97
- endif ()
98
-
99
- if (COMMAND add_custom_testing_target_compile_definitions )
100
- add_custom_testing_target_compile_definitions ()
101
- endif ()
102
-
Original file line number Diff line number Diff line change 17
17
#pragma once
18
18
19
19
#include < aws/testing/Testing_EXPORTS.h>
20
+ #include < aws/core/Aws.h>
20
21
21
22
namespace Aws
22
23
{
@@ -34,4 +35,9 @@ namespace Environment
34
35
AWS_TESTING_API int UnSetEnv (const char * name);
35
36
36
37
} // namespace Environment
38
+ namespace Testing
39
+ {
40
+ AWS_TESTING_API void InitPlatformTest (Aws::SDKOptions& sdkOptions);
41
+ AWS_TESTING_API void ShutdownPlatformTest (Aws::SDKOptions& sdkOptions);
42
+ } // namespace Testing
37
43
} // namespace Aws
Original file line number Diff line number Diff line change @@ -33,4 +33,17 @@ int UnSetEnv(const char* name)
33
33
}
34
34
35
35
} // namespace Environment
36
+
37
+ namespace Testing
38
+ {
39
+ void InitPlatformTest (Aws::SDKOptions& sdkOptions)
40
+ {
41
+ AWS_UNREFERENCED_PARAM (sdkOptions);
42
+ }
43
+
44
+ void ShutdownPlatformTest (Aws::SDKOptions& sdkOptions)
45
+ {
46
+ AWS_UNREFERENCED_PARAM (sdkOptions);
47
+ }
48
+ } // namespace Testing
36
49
} // namespace Aws
Original file line number Diff line number Diff line change @@ -31,4 +31,17 @@ int UnSetEnv(const char* name)
31
31
}
32
32
33
33
} // namespace Environment
34
+
35
+ namespace Testing
36
+ {
37
+ void InitPlatformTest (Aws::SDKOptions& sdkOptions)
38
+ {
39
+ AWS_UNREFERENCED_PARAM (sdkOptions);
40
+ }
41
+
42
+ void ShutdownPlatformTest (Aws::SDKOptions& sdkOptions)
43
+ {
44
+ AWS_UNREFERENCED_PARAM (sdkOptions);
45
+ }
46
+ } // namespace Testing
34
47
} // namespace Aws
Original file line number Diff line number Diff line change @@ -39,4 +39,17 @@ int UnSetEnv(const char* name)
39
39
}
40
40
41
41
} // namespace Environment
42
+
43
+ namespace Testing
44
+ {
45
+ void InitPlatformTest (Aws::SDKOptions& sdkOptions)
46
+ {
47
+ AWS_UNREFERENCED_PARAM (sdkOptions);
48
+ }
49
+
50
+ void ShutdownPlatformTest (Aws::SDKOptions& sdkOptions)
51
+ {
52
+ AWS_UNREFERENCED_PARAM (sdkOptions);
53
+ }
54
+ } // namespace Testing
42
55
} // namespace Aws
You can’t perform that action at this time.
0 commit comments