blob: 49c4cf7ad4605a448711b36722ea041634f84428 [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>
Chenjie Luo3c3f9d42014-09-04 16:20:49 -070019#include "android_security_cts_NetlinkSocket.h"
Nick Kralevich65374942012-12-18 10:36:12 -080020
Nick Kralevich4267ab62013-11-12 12:14:00 -080021extern int register_android_security_cts_KernelSettingsTest(JNIEnv*);
Nick Kralevich65374942012-12-18 10:36:12 -080022extern int register_android_security_cts_CharDeviceTest(JNIEnv*);
Alex Klyubine49838e2013-08-23 10:25:04 -070023extern int register_android_security_cts_LinuxRngTest(JNIEnv*);
Nick Kralevichdeadf912013-07-02 17:18:09 -070024extern int register_android_security_cts_NativeCodeTest(JNIEnv*);
Eric Laurent6fe72da2013-08-23 17:29:00 -070025extern int register_android_security_cts_LoadEffectLibraryTest(JNIEnv*);
Robert Sesek9a2dedf2014-02-28 15:05:15 -050026extern int register_android_security_cts_SeccompDeathTestService(JNIEnv*);
Nick Kralevich9d47ac42013-10-10 16:24:46 -070027extern int register_android_security_cts_SELinuxTest(JNIEnv*);
Anton Carverca7f0f82014-08-13 18:08:27 +010028extern int register_android_security_cts_MMapExecutableTest(JNIEnv* env);
Eric Laurent424e9262014-10-29 10:07:07 -070029extern int register_android_security_cts_AudioPolicyBinderTest(JNIEnv* env);
jjwongfc2d5e22016-04-13 15:32:43 +080030extern int register_android_security_cts_AudioEffectBinderTest(JNIEnv* env);
jjwongbf2570c2016-04-15 10:38:06 +080031extern int register_android_security_cts_StagefrightFoundationTest(JNIEnv* env);
Nick Kralevich65374942012-12-18 10:36:12 -080032
33jint JNI_OnLoad(JavaVM *vm, void *reserved) {
34 JNIEnv *env = NULL;
35
36 if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) {
37 return JNI_ERR;
38 }
39
40 if (register_android_security_cts_CharDeviceTest(env)) {
41 return JNI_ERR;
42 }
43
Alex Klyubine49838e2013-08-23 10:25:04 -070044 if (register_android_security_cts_LinuxRngTest(env)) {
45 return JNI_ERR;
46 }
47
Nick Kralevichdeadf912013-07-02 17:18:09 -070048 if (register_android_security_cts_NativeCodeTest(env)) {
49 return JNI_ERR;
50 }
51
Eric Laurent6fe72da2013-08-23 17:29:00 -070052 if (register_android_security_cts_LoadEffectLibraryTest(env)) {
53 return JNI_ERR;
54 }
55
Robert Sesek9a2dedf2014-02-28 15:05:15 -050056 if (register_android_security_cts_SeccompDeathTestService(env)) {
57 return JNI_ERR;
58 }
59
Nick Kralevich9d47ac42013-10-10 16:24:46 -070060 if (register_android_security_cts_SELinuxTest(env)) {
61 return JNI_ERR;
62 }
63
Nick Kralevich4267ab62013-11-12 12:14:00 -080064 if (register_android_security_cts_KernelSettingsTest(env)) {
65 return JNI_ERR;
66 }
67
Anton Carverca7f0f82014-08-13 18:08:27 +010068 if (register_android_security_cts_MMapExecutableTest(env)) {
69 return JNI_ERR;
70 }
71
Chenjie Luo3c3f9d42014-09-04 16:20:49 -070072 if (register_android_security_cts_NetlinkSocket(env)) {
73 return JNI_ERR;
74 }
75
Eric Laurent424e9262014-10-29 10:07:07 -070076 if (register_android_security_cts_AudioPolicyBinderTest(env)) {
77 return JNI_ERR;
78 }
79
jjwongfc2d5e22016-04-13 15:32:43 +080080 if (register_android_security_cts_AudioEffectBinderTest(env)) {
81 return JNI_ERR;
82 }
83
jjwongbf2570c2016-04-15 10:38:06 +080084 if (register_android_security_cts_StagefrightFoundationTest(env)) {
85 return JNI_ERR;
86 }
87
Nick Kralevich65374942012-12-18 10:36:12 -080088 return JNI_VERSION_1_4;
89}