blob: 580e02b214205ecc59a3acb42c8541dc5680deed [file] [log] [blame]
Nick Kralevich65374942012-12-18 10:36:12 -08001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <jni.h>
18#include <stdio.h>
19
Nick Kralevich4267ab62013-11-12 12:14:00 -080020extern int register_android_security_cts_KernelSettingsTest(JNIEnv*);
Nick Kralevich65374942012-12-18 10:36:12 -080021extern int register_android_security_cts_CharDeviceTest(JNIEnv*);
Alex Klyubine49838e2013-08-23 10:25:04 -070022extern int register_android_security_cts_LinuxRngTest(JNIEnv*);
Nick Kralevichdeadf912013-07-02 17:18:09 -070023extern int register_android_security_cts_NativeCodeTest(JNIEnv*);
Eric Laurent6fe72da2013-08-23 17:29:00 -070024extern int register_android_security_cts_LoadEffectLibraryTest(JNIEnv*);
Nick Kralevich9d47ac42013-10-10 16:24:46 -070025extern int register_android_security_cts_SELinuxTest(JNIEnv*);
Anton Carverca7f0f82014-08-13 18:08:27 +010026extern int register_android_security_cts_MMapExecutableTest(JNIEnv* env);
Eric Laurent424e9262014-10-29 10:07:07 -070027extern int register_android_security_cts_AudioPolicyBinderTest(JNIEnv* env);
Sami Tolvanenf48612d2015-07-09 13:57:32 +010028extern int register_android_security_cts_EncryptionTest(JNIEnv* env);
Robert Shihe9439232015-09-03 15:49:14 -070029extern int register_android_security_cts_MediaPlayerInfoLeakTest(JNIEnv* env);
Andy Hung1fe82772015-08-31 19:00:47 -070030extern int register_android_security_cts_AudioEffectBinderTest(JNIEnv* env);
Nick Kralevich65374942012-12-18 10:36:12 -080031
32jint JNI_OnLoad(JavaVM *vm, void *reserved) {
33 JNIEnv *env = NULL;
34
35 if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) {
36 return JNI_ERR;
37 }
38
39 if (register_android_security_cts_CharDeviceTest(env)) {
40 return JNI_ERR;
41 }
42
Alex Klyubine49838e2013-08-23 10:25:04 -070043 if (register_android_security_cts_LinuxRngTest(env)) {
44 return JNI_ERR;
45 }
46
Nick Kralevichdeadf912013-07-02 17:18:09 -070047 if (register_android_security_cts_NativeCodeTest(env)) {
48 return JNI_ERR;
49 }
50
Eric Laurent6fe72da2013-08-23 17:29:00 -070051 if (register_android_security_cts_LoadEffectLibraryTest(env)) {
52 return JNI_ERR;
53 }
54
Nick Kralevich9d47ac42013-10-10 16:24:46 -070055 if (register_android_security_cts_SELinuxTest(env)) {
56 return JNI_ERR;
57 }
58
Nick Kralevich4267ab62013-11-12 12:14:00 -080059 if (register_android_security_cts_KernelSettingsTest(env)) {
60 return JNI_ERR;
61 }
62
Anton Carverca7f0f82014-08-13 18:08:27 +010063 if (register_android_security_cts_MMapExecutableTest(env)) {
64 return JNI_ERR;
65 }
66
Eric Laurent424e9262014-10-29 10:07:07 -070067 if (register_android_security_cts_AudioPolicyBinderTest(env)) {
68 return JNI_ERR;
69 }
70
Sami Tolvanenf48612d2015-07-09 13:57:32 +010071 if (register_android_security_cts_EncryptionTest(env)) {
72 return JNI_ERR;
73 }
74
Robert Shihe9439232015-09-03 15:49:14 -070075 if (register_android_security_cts_MediaPlayerInfoLeakTest(env)) {
76 return JNI_ERR;
77 }
78
Andy Hung1fe82772015-08-31 19:00:47 -070079 if (register_android_security_cts_AudioEffectBinderTest(env)) {
80 return JNI_ERR;
81 }
82
Nick Kralevich65374942012-12-18 10:36:12 -080083 return JNI_VERSION_1_4;
84}