JNIEXPORT jint JNICALL Java_aws_androidsdktesting_RunSDKTests_runTests( JNIEnv* env, jobject classRef, jobject context ) { Aws::Platform::InitAndroid(env, context); // If we upload files to where we expect them to be (cache) then we lose write access to the cache // directory since it gets created by the root user before the application has an opportunity to create it. // So when running tests, wait until the application // is running before copying data from their upload location to their expected location. // // Real development should be done via the Cognito/PersistentIdentity credentials providers, where this is not as much // a problem CacheFile("credentials", ".aws"); CacheFile("handled.zip", s_resourceDirectory); CacheFile("succeed.zip", s_resourceDirectory); CacheFile("unhandled.zip", s_resourceDirectory); CacheSigV4Tests(s_resourceDirectory); jint result = 0; AWS_UNREFERENCED_PARAM(classRef); AWS_BEGIN_MEMORY_TEST(1024, 128) result = RunAndroidTestsInternal(); AWS_END_MEMORY_OVERRIDE return result; }
int SetEnv(const char* name, const char* value, int overwrite) { AWS_UNREFERENCED_PARAM(overwrite); Aws::StringStream ss; ss << name << "=" << value; return _putenv(ss.str().c_str()); }
void SecureMemClear(unsigned char *data, size_t length) { memset(data, 0, length); if(length > 0) { volatile unsigned char* volData = (volatile unsigned char *)data; auto val = *volData; AWS_UNREFERENCED_PARAM(val); } }
void InitializeAWSMemorySystem(MemorySystemInterface& memorySystem) { #ifdef AWS_CUSTOM_MEMORY_MANAGEMENT if(AWSMemorySystem != nullptr) { AWSMemorySystem->End(); } AWSMemorySystem = &memorySystem; AWSMemorySystem->Begin(); #else AWS_UNREFERENCED_PARAM(memorySystem); #endif // AWS_CUSTOM_MEMORY_MANAGEMENT }
void ShutdownPlatformTest(Aws::SDKOptions& sdkOptions) { AWS_UNREFERENCED_PARAM(sdkOptions); }
void InitPlatformTest(Aws::SDKOptions& sdkOptions) { AWS_UNREFERENCED_PARAM(sdkOptions); }
BatchUpdateLinkAttributesResponse& BatchUpdateLinkAttributesResponse::operator =(JsonView jsonValue) { AWS_UNREFERENCED_PARAM(jsonValue); return *this; }