blob: 0200980c99532858fd4d6abb81e9ca11d47e381e [file] [log] [blame]
Brian Silverman41cdd3e2019-01-19 19:48:58 -08001description = "A plugin that listens on a socket so that you can use the real Driver Station software to connect to the simulation"
2
3ext {
4 includeWpiutil = true
5 pluginName = 'halsim_ds_socket'
6}
7
8apply plugin: 'google-test-test-suite'
9
10
11ext {
12 staticGtestConfigs = [:]
13}
14
15staticGtestConfigs["${pluginName}Test"] = []
16apply from: "${rootDir}/shared/googletest.gradle"
17
18apply from: "${rootDir}/shared/plugins/setupBuild.gradle"
19
20
21model {
22 testSuites {
23 def comps = $.components
24 if (!project.hasProperty('onlyAthena') && !project.hasProperty('onlyRaspbian')) {
25 "${pluginName}Test"(GoogleTestTestSuiteSpec) {
26 for(NativeComponentSpec c : comps) {
27 if (c.name == pluginName) {
28 testing c
29 break
30 }
31 }
32 sources {
33 cpp {
34 source {
35 srcDirs 'src/test/native/cpp'
36 include '**/*.cpp'
37 }
38 exportedHeaders {
39 srcDirs 'src/test/native/include', 'src/main/native/cpp'
40 }
41 }
42 }
43 }
44 }
45 }
46 binaries {
47 withType(GoogleTestTestSuiteBinarySpec) {
48 project(':hal').addHalDependency(it, 'shared')
49 lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
50 lib library: pluginName, linkage: 'shared'
51 }
52 }
53}
54
55tasks.withType(RunTestExecutable) {
56 args "--gtest_output=xml:test_detail.xml"
57 outputs.dir outputDir
58}