blob: 440e5d9abd910c9dc11d684660d23b869dd0e559 [file] [log] [blame]
Brian Silverman8fce7482020-01-05 13:18:21 -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('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian') && !project.hasProperty('onlylinuxaarch64bionic')) {
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 if (it.targetPlatform.name == nativeUtils.wpi.platforms.roborio) {
52 nativeUtils.useRequiredLibrary(it, 'netcomm_shared', 'chipobject_shared', 'visa_shared', 'ni_runtime_shared')
53 }
54 }
55 }
56}
57
58tasks.withType(RunTestExecutable) {
59 args "--gtest_output=xml:test_detail.xml"
60 outputs.dir outputDir
61}