Skip to content

Commit

Permalink
[build] Publish unit tests for examples (#5838)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse authored Oct 27, 2023
1 parent 4992023 commit 04dcd80
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
12 changes: 12 additions & 0 deletions wpilibcExamples/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ task cppExamplesZip(type: Zip) {
from('src/main/cpp/examples') {
into 'examples'
}

from('src/test/cpp/examples') {
into 'examples_test'
}
}

task cppTemplatesZip(type: Zip) {
Expand All @@ -35,6 +39,10 @@ task cppTemplatesZip(type: Zip) {
from('src/main/cpp/templates') {
into 'templates'
}

from('src/test/cpp/templates') {
into 'templates_test'
}
}

task cppCommandsZip(type: Zip) {
Expand All @@ -48,6 +56,10 @@ task cppCommandsZip(type: Zip) {
from('src/main/cpp/commands') {
into 'commands'
}

from('src/test/cpp/commands') {
into 'commands_test'
}
}

build.dependsOn cppTemplatesZip
Expand Down
3 changes: 2 additions & 1 deletion wpilibcExamples/src/main/cpp/examples/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,8 @@
],
"foldername": "UnitTest",
"gradlebase": "cpp",
"commandversion": 2
"commandversion": 2,
"hasunittests": true
},
{
"name": "SimpleDifferentialDriveSimulation",
Expand Down
12 changes: 12 additions & 0 deletions wpilibjExamples/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ task javaExamplesZip(type: Zip) {
from('src/main/java/edu/wpi/first/wpilibj/examples') {
into 'examples'
}

from('src/test/java/edu/wpi/first/wpilibj/examples') {
into 'examples_test'
}
}

task javaTemplatesZip(type: Zip) {
Expand All @@ -35,6 +39,10 @@ task javaTemplatesZip(type: Zip) {
from('src/main/java/edu/wpi/first/wpilibj/templates') {
into 'templates'
}

from('src/test/java/edu/wpi/first/wpilibj/templates') {
into 'templates_test'
}
}

task javaCommandsZip(type: Zip) {
Expand All @@ -48,6 +56,10 @@ task javaCommandsZip(type: Zip) {
from('src/main/java/edu/wpi/first/wpilibj/commands') {
into 'commands'
}

from('src/test/java/edu/wpi/first/wpilibj/commands') {
into 'commands_test'
}
}

build.dependsOn javaTemplatesZip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,8 @@
"foldername": "unittest",
"gradlebase": "java",
"mainclass": "Main",
"commandversion": 2
"commandversion": 2,
"hasunittests": true
},
{
"name": "DifferentialDrivePoseEstimator",
Expand Down

0 comments on commit 04dcd80

Please sign in to comment.