blob: 822f3415d4f88f5ca2eae797918bd4b3e18c3dec [file] [log] [blame]
Ray Milkeyf80bbb22016-03-11 10:16:22 -08001SRC = 'src/main/java/org/onosproject/**/'
Brian O'Connor5cee3352016-04-05 20:34:52 -07002#FIXME there are some tests in main
Ray Milkeyf80bbb22016-03-11 10:16:22 -08003TEST = 'src/main/java/org/onosproject/**/'
4
5COMPILE_DEPS = [
6 '//lib:CORE_DEPS',
7 '//lib:org.apache.karaf.shell.console',
8 '//cli:onos-cli',
9 '//utils/rest:onlab-rest',
10 '//lib:javax.ws.rs-api',
11 '//core/store/serializers:onos-core-serializers',
12]
13
14TEST_DEPS = [
15 '//lib:TEST',
16]
17
18java_library(
19 name = 'onos-app-test',
20 visibility = ['PUBLIC'],
21 deps = [':onos-app-demo',
22 ':onos-app-distributed-primitives',
23 ':onos-app-election',
24 ':onos-app-intent-perf',
25 ':onos-app-loadtest',
26 ':onos-app-messaging-perf',
27 ],
28)
29
30# demo
31
32java_library(
33 name = 'onos-app-demo',
34 srcs = glob(['demo/' + SRC + '*.java']),
35 deps = COMPILE_DEPS,
36 visibility = ['PUBLIC'],
37)
38
39java_test(
40 name = 'onos-app-demo-tests',
41 srcs = glob(['demo/' + TEST + '*.java']),
42 deps = COMPILE_DEPS +
43 TEST_DEPS +
44 [':onos-app-demo'],
45 source_under_test = [':onos-app-demo'],
46)
47
48# distributed-primitives
49
50java_library(
51 name = 'onos-app-distributed-primitives',
52 srcs = glob(['distributed-primitives/' + SRC + '*.java']),
53 deps = COMPILE_DEPS,
54 visibility = ['PUBLIC'],
55)
56
57java_test(
58 name = 'onos-app-distributed-primitives-tests',
59 srcs = glob(['distributed-primitives/' + TEST + '*.java']),
60 deps = COMPILE_DEPS +
61 TEST_DEPS +
62 [':onos-app-distributed-primitives'],
63 source_under_test = [':onos-app-distributed-primitives'],
64)
65
66# election
67
68java_library(
69 name = 'onos-app-election',
70 srcs = glob(['election/' + SRC + '*.java']),
71 deps = COMPILE_DEPS,
72 visibility = ['PUBLIC'],
73)
74
75java_test(
76 name = 'onos-app-election-tests',
77 srcs = glob(['election/' + TEST + '*.java']),
78 deps = COMPILE_DEPS +
79 TEST_DEPS +
80 [':onos-app-election'],
81 source_under_test = [':onos-app-election'],
82)
83
84# intent-perf
85
86java_library(
87 name = 'onos-app-intent-perf',
88 srcs = glob(['intent-perf/' + SRC + '*.java']),
89 deps = COMPILE_DEPS,
90 visibility = ['PUBLIC'],
91)
92
93java_test(
94 name = 'onos-app-intent-perf-tests',
95 srcs = glob(['intent-perf/' + TEST + '*.java']),
96 deps = COMPILE_DEPS +
97 TEST_DEPS +
98 [':onos-app-intent-perf'],
99 source_under_test = [':onos-app-intent-perf'],
100)
101
102# loadtest
103
104java_library(
105 name = 'onos-app-loadtest',
106 srcs = glob(['loadtest/' + SRC + '*.java']),
107 deps = COMPILE_DEPS,
108 visibility = ['PUBLIC'],
109)
110
111java_test(
112 name = 'onos-app-loadtest-tests',
113 srcs = glob(['loadtest/' + TEST + '*.java']),
114 deps = COMPILE_DEPS +
115 TEST_DEPS +
116 [':onos-app-loadtest'],
117 source_under_test = [':onos-app-loadtest'],
118)
119
120# messaging-perf
121
122java_library(
123 name = 'onos-app-messaging-perf',
124 srcs = glob(['messaging-perf/' + SRC + '*.java']),
125 deps = COMPILE_DEPS,
126 visibility = ['PUBLIC'],
127)
128
129java_test(
130 name = 'onos-app-messaging-perf-tests',
131 srcs = glob(['messaging-perf/' + TEST + '*.java']),
132 deps = COMPILE_DEPS +
133 TEST_DEPS +
134 [':onos-app-messaging-perf'],
135 source_under_test = [':onos-app-messaging-perf'],
136)
137