Skip to content
Snippets Groups Projects
Commit 140a7ea9 authored by Daniel Stonier's avatar Daniel Stonier
Browse files

message generation test handling.

parent 5b2a4e1b
No related branches found
No related tags found
No related merge requests found
Showing
with 48 additions and 12 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="gradle_plugins/src/main/groovy"/>
<classpathentry kind="src" path="message_generation/src/test/java"/>
<classpathentry kind="src" path="message_generation/src/main/java"/>
<classpathentry kind="lib" path="gradle/wrapper/gradle-wrapper.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
......
......@@ -21,6 +21,7 @@ task wrapper(type: Wrapper) {
project.ext {
/* the ros plugin defines this, but since we're building the plugin... */
rosMavenDeploymentPath = "$System.env.ROS_MAVEN_DEPLOYMENT_PATH"
rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':')
}
allprojects {
......@@ -28,12 +29,19 @@ allprojects {
}
subprojects {
/* Have to manually do this below since our gradle plugin is our sub project */
apply plugin: 'java'
apply plugin: 'maven'
sourceCompatibility = 1.6
targetCompatibility = 1.6
def repoURLs = project.rosMavenPath.collect { 'file://' + it }
repositories {
repoURLs.each { p ->
maven {
url 'file://' + project.rosMavenDeploymentPath
url p
}
}
mavenLocal()
maven {
......@@ -43,7 +51,6 @@ subprojects {
if ( project.rosMavenDeploymentPath != 'null' && project.rosMavenDeploymentPath != '' ) {
uploadArchives {
repositories.mavenDeployer {
println("Class: " + repository(url: 'file://' + project.rosMavenDeploymentPath).getClass())
repository(url: 'file://' + project.rosMavenDeploymentPath)
}
}
......
test_ros/Composite data
/*
* Copyright (C) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
version='0.1.0'
dependencies {
compile project(':gradle_plugins')
compile project(':rosjava_test_msgs')
}
jar {
manifest {
version = project.version
symbolicName = 'org.ros.rosjava_bootstrap.message_generation_tests'
}
}
......@@ -52,31 +52,31 @@ public class Md5GeneratorTest {
@Test
public void testPrimitives() {
TopicDescription topicDescription =
topicDescriptionFactory.newFromType("test_ros/TestPrimitives");
topicDescriptionFactory.newFromType("rosjava_test_msgs/TestPrimitives");
assertEquals("3e70f428a22c0d26ca67f87802c8e00f", topicDescription.getMd5Checksum());
}
@Test
public void testString() {
TopicDescription topicDescription = topicDescriptionFactory.newFromType("test_ros/TestString");
TopicDescription topicDescription = topicDescriptionFactory.newFromType("rosjava_test_msgs/TestString");
assertEquals("334ff4377be93faa44ebc66d23d40fd3", topicDescription.getMd5Checksum());
}
@Test
public void testHeader() {
TopicDescription topicDescription = topicDescriptionFactory.newFromType("test_ros/TestHeader");
TopicDescription topicDescription = topicDescriptionFactory.newFromType("rosjava_test_msgs/TestHeader");
assertEquals("4b5a00f536da2f756ba6aebcf795a967", topicDescription.getMd5Checksum());
}
@Test
public void testArrays() {
TopicDescription topicDescription = topicDescriptionFactory.newFromType("test_ros/TestArrays");
TopicDescription topicDescription = topicDescriptionFactory.newFromType("rosjava_test_msgs/TestArrays");
assertEquals("4cc9b5e2cebe791aa3e994f5bc159eb6", topicDescription.getMd5Checksum());
}
@Test
public void testComposite() {
TopicDescription topicDescription = topicDescriptionFactory.newFromType("test_ros/Composite");
TopicDescription topicDescription = topicDescriptionFactory.newFromType("rosjava_test_msgs/Composite");
assertEquals("d8fb6eb869ad3956b50e8737d96dc9fa", topicDescription.getMd5Checksum());
}
......@@ -95,14 +95,14 @@ public class Md5GeneratorTest {
@Test
public void testAddTwoInts() {
ServiceDescription serviceDescription =
serviceDescriptionFactory.newFromType("test_ros/AddTwoInts");
serviceDescriptionFactory.newFromType("rosjava_test_msgs/AddTwoInts");
assertEquals("6a2e34150c00229791cc89ff309fff21", serviceDescription.getMd5Checksum());
}
@Test
public void testTransitiveSrv() {
ServiceDescription serviceDescription =
serviceDescriptionFactory.newFromType("test_rospy/TransitiveSrv");
serviceDescriptionFactory.newFromType("rosjava_test_msgspy/TransitiveSrv");
assertEquals("8b7918ee2b81eaf825f4c70de011f6fa", serviceDescription.getMd5Checksum());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment