Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.etrice.generator.cpp.tests')
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/Makefile16
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/build.gradle2
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/make.xml122
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch36
5 files changed, 1 insertions, 185 deletions
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/Makefile b/tests/org.eclipse.etrice.generator.cpp.tests/Makefile
deleted file mode 100644
index b6b863770..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# for make.xml
-
-#include ${CPP_MODELLIB_ROOTDIR}/buildTools/modellib.mk
-include ${CPP_RUNTIME_ROOTDIR}/buildTools/runtime.mk
-
-# ---
-IN_TARGET := ${APP_TARGET}
-IN_BUILD_DIR := ${APP_BUILD_DIR}
-IN_INCDIRS += ${APP_SRCDIRS_REC}
-IN_SRCDIRS_REC += ${APP_SRCDIRS_REC}
-CC = ${CXX}
-IN_CFLAGS += -std=c++98 -O0 -g3 -pedantic -Wall
-#---
-
-# Create rules
-include ${RUNTIME_ROOTDIR}/buildTools/Makefile.mk \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec b/tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec
deleted file mode 100644
index 39f8c66f3..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.generator.cpp.tests" componentType="buckminster" version="0.5.0.qualifier">
- <cs:actions>
- <cs:public name="run_tests" actor="ant">
- <cs:actorProperties>
- <cs:property key="buildFile" value="make.xml"/>
- <cs:property key="targets" value="all"/>
- </cs:actorProperties>
- </cs:public>
- </cs:actions>
-</cs:cspec>
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/build.gradle b/tests/org.eclipse.etrice.generator.cpp.tests/build.gradle
index 1860582d3..aede47920 100644
--- a/tests/org.eclipse.etrice.generator.cpp.tests/build.gradle
+++ b/tests/org.eclipse.etrice.generator.cpp.tests/build.gradle
@@ -2,7 +2,7 @@ plugins {
id 'cpp'
}
-apply from: etTest
+apply from: "$rootDir/gradle/etTest.gradle"
def genericPhysical = '../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys'
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/make.xml b/tests/org.eclipse.etrice.generator.cpp.tests/make.xml
deleted file mode 100644
index af3fe27d6..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/make.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Ant makefile for building and running of tests.
-
- Includes common.xml from org.eclipse.etrice.generator.common.tests
--->
-<project name="org.eclipse.etrice.generator.cpp.tests" basedir="." default="all">
-
- <!-- <target name="testing" depends="setVars,common.testing">
-
- // add test here, testid==testSuiteFileName
- <echo>done with ${ant.project.name}</echo>
- </target> -->
-
- <target name="testing" depends="copyModels">
- <!-- modified target from common.xml because cpp is not complete yet -->
- <test testid="SendingDataTestCpp" models="${models.path}/sendingData/SendingDataTestCpp.room ${models.path}/GenericPhysical.etphys" />
- <test testid="CompileTests" models="${models.path}/CompileTests.room ${models.path}/GenericPhysical.etphys ${models.path}/DetailExpressionTest.room ${models.path}/StatemachineInterfaceTest.room ${models.path}/StatemachineInterfaceInheritedTest.room ${models.path}/StatemachineInterfaceTest.room ${models.path}/ContinuationTransitionTest.room ${models.path}/TimingService.room" />
- <test testid="ActorCommunicationTest" models="${models.path}/ActorCommunicationTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TimingService.room" />
- <test testid="ChoicePointTest" models="${models.path}/ChoicePointTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="ChoicePointTestExtended" models="${models.path}/ChoicePointTestExtended.room ${models.path}/GenericPhysical.etphys" />
- <test testid="DataDrivenTest" models="${models.path}/DataDrivenTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TimingService.room" />
- <test testid="HandlerTest" models="${models.path}/HandlerTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="OperationInheritanceTest" models="${models.path}/OperationInheritanceTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="PingPongThreadTest" models="${models.path}/PingPongThreadTest.etmap ${models.path}/PingPongThreadTest.room ${models.path}/TimingService.room" />
- <test testid="PingPongThreadReplPortTest" models="${models.path}/PingPongThreadReplPortTest.etmap ${models.path}/PingPongThreadReplPortTest.room ${models.path}/TimingService.room" />
- <test testid="InitializationTest" models="${models.path}/InitializationTest.room ${models.path}/GenericPhysical.etphys" />
- </target>
-
- <target name="copyModels" depends="common.copyModels">
- <copy todir="${models.path}">
- <fileset dir="./targetModels"/>
- </copy>
- <!--<move file="${models.path}/staticConfig/StaticConfigTest_C.room" toFile="${models.path}/staticConfig//StaticConfigTest.room" />-->
- </target>
-
- <!-- ################################################################ -->
-
- <import file="../org.eclipse.etrice.generator.common.tests/common.xml" as="common"/>
-
- <property name="runtime.path" value="../../runtime/org.eclipse.etrice.runtime.c" />
- <property name="modellib.path" value="../../runtime/org.eclipse.etrice.modellib.cpp" />
- <property name="cpp-runtime.path" value="../../runtime/org.eclipse.etrice.runtime.cpp" />
-
- <target name="set_local_rt" unless="runtime.platform">
- <!--<property name="runtime.platform" value="MT_POSIX_GENERIC_GCC"/>-->
- <property name="runtime.platform" value="MT_WIN_MinGW"/>
- <echo> runtime.platform = ${runtime.platform} </echo>
- </target>
- <target name="setVars" depends="set_local_rt,common.setVars"/>
-
- <target name="all" depends="clean,copyModels,testing"></target>
-
- <!-- test := generate 1 executable, build, run, process results -->
- <macrodef name="test">
- <attribute name="testId"/>
- <attribute name="models"/>
- <sequential>
- <echo>generating @{testId}</echo>
- <standaloneGenerator testId="@{testId}" models="@{models}"/>
-
- <echo>building @{testId}</echo>
- <build testId="@{testId}"/>
-
- <echo>running @{testId}</echo>
- <run testId="@{testId}"/>
-
- <echo>converting @{testId}</echo>
- <convert testId="@{testId}"/>
-
- <echo>copying result @{testId}</echo>
- <copyResult testId="@{testId}" targetId="CPP_${runtime.platform}_"/>
- </sequential>
- </macrodef>
-
- <macrodef name="standaloneGenerator">
- <attribute name="testId"/>
- <attribute name="models"/>
- <sequential>
- <mkdir dir="${output}"/>
- <java output="${output}/@{testId}_generate.txt" error="${output}/@{testId}_generate_err.txt" classname="org.eclipse.etrice.generator.cpp.Main" fork="true" failonerror="true">
- <arg line="@{models}"/>
- <arg value="-genDir"/><arg value="src-gen/@{testId}"/>
- <arg value="-msc_instr"/>
- <classpath refid="etrice.clspath"/>
- </java>
- </sequential>
- </macrodef>
-
- <!--
- build: compiles and links the generated Cpp sources
- -->
- <macrodef name="build">
- <attribute name="testId"/>
- <sequential>
- <mkdir dir="${bin.path}"/>
- <mkdir dir="${output}"/>
- <exec executable="make" failonerror="true" output="${output}/@{testId}_build.txt">
- <arg line="all"/>
- <arg line="APP_TARGET=@{testId}.exe"/>
- <arg line="APP_BUILD_DIR=${bin.path}"/>
- <arg line="APP_SRCDIRS_REC='./src-gen/@{testId} ./src/@{testId}'"/>
- <arg line="RUNTIME_ROOTDIR=${runtime.path}"/>
- <arg line="CPP_RUNTIME_ROOTDIR=${cpp-runtime.path}"/>
- <arg line="MODELLIB_ROOTDIR=${modellib.path}"/>
- <arg line="TARGET_PLATFORM=${runtime.platform}"/>
- </exec>
- </sequential>
- </macrodef>
-
- <macrodef name="run">
- <attribute name="testId"/>
- <sequential>
- <mkdir dir="${output}"/>
- <mkdir dir="${testlog.path}"/>
- <exec dir="./" output="${output}/@{testId}_run.txt" resolveexecutable="true" executable="${bin.path}/@{testId}.exe" timeout="${run.msTimout}">
- <arg value="-run_as_test"/>
- </exec>
- </sequential>
- </macrodef>
-
-</project>
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch b/tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch
deleted file mode 100644
index 6849d0869..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.generator.cpp.tests/make.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.generator.cpp.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_PROPERTIES">
-<mapEntry key="eclipse.home" value="${eclipse_home}"/>
-<mapEntry key="eclipse.pdebuild.home" value="${target_platform_plugin_location:org.eclipse.pde.build}"/>
-<mapEntry key="eclipse.pdebuild.scripts" value="${target_platform_plugin_location:org.eclipse.pde.build}/scripts/"/>
-<mapEntry key="eclipse.pdebuild.templates" value="${target_platform_plugin_location:org.eclipse.pde.build}/templates/"/>
-<mapEntry key="eclipse.running" value="true"/>
-<mapEntry key="com.google.guava" value="${target_platform_plugin_location:com.google.guava}"/>
-<mapEntry key="com.google.inject" value="${target_platform_plugin_location:com.google.inject}"/>
-<mapEntry key="javax.inject" value="${target_platform_plugin_location:javax.inject}"/>
-<mapEntry key="org.antlr.runtime" value="${target_platform_plugin_location:org.antlr.runtime}"/>
-<mapEntry key="org.apache.log4j" value="${target_platform_plugin_location:org.apache.log4j}"/>
-<mapEntry key="org.eclipse.emf.common" value="${target_platform_plugin_location:org.eclipse.emf.common}"/>
-<mapEntry key="org.eclipse.emf.ecore" value="${target_platform_plugin_location:org.eclipse.emf.ecore}"/>
-<mapEntry key="org.eclipse.emf.ecore.xmi" value="${target_platform_plugin_location:org.eclipse.emf.ecore.xmi}"/>
-<mapEntry key="org.eclipse.equinox.common" value="${target_platform_plugin_location:org.eclipse.equinox.common}"/>
-<mapEntry key="org.eclipse.xtend.lib" value="${target_platform_plugin_location:org.eclipse.xtend.lib}"/>
-<mapEntry key="org.eclipse.xtext" value="${target_platform_plugin_location:org.eclipse.xtext}"/>
-<mapEntry key="org.eclipse.xtext.common.types" value="${target_platform_plugin_location:org.eclipse.xtext.common.types}"/>
-<mapEntry key="org.eclipse.xtext.util" value="${target_platform_plugin_location:org.eclipse.xtext.util}"/>
-<mapEntry key="org.eclipse.xtext.xbase.lib" value="${target_platform_plugin_location:org.eclipse.xtext.xbase.lib}"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.etrice.generator.cpp.tests/make.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>

Back to the top