Rename our allwpilib (which is now 2020) to not have 2019 in the name
Change-Id: I3c07f85ed32ab8b97db765a9b43f2a6ce7da964a
diff --git a/shared/cppDesktopTestTask.gradle b/shared/cppDesktopTestTask.gradle
new file mode 100644
index 0000000..04b7224
--- /dev/null
+++ b/shared/cppDesktopTestTask.gradle
@@ -0,0 +1,21 @@
+model {
+ tasks {
+ def ts = $.testSuites
+ project.tasks.register('testDesktopCpp') { testTask->
+ def systemArch = getCurrentArch()
+ def found = false
+ ts.each {
+ if (it in GoogleTestTestSuiteSpec && it.name == "${nativeName}Test") {
+ it.binaries.each {
+ if (found) return
+ def arch = it.targetPlatform.name
+ if (arch == systemArch && it.buildType.name == 'debug') {
+ testTask.dependsOn it.tasks.run
+ found = true
+ }
+ }
+ }
+ }
+ }
+ }
+}