I have imported a .osm file from QGIS and then I used sumo-0.22.0 to generate .net.xml ; .poly.xml and .rou.xml files since I use Veins-4a2. When I simulated the scenario of Veins, the application layer of RSU did not executed. So I need to understand how the Erlangen files was done because the problem is my scenario (my files).
Can you tell me please what are the steps used to generated the .net.xml ; .poly.xml and .rou.xml?
You can always have a look at the xml files with a text editor or even a simple pager. Almost all sumo tools write a header to their output files which tells the version, the options and the date of creation. In case of the erlangen network this says:
<!-- generated on Wed Nov 30 12:18:33 2011 by SUMO netconvert Version 0.13.1
<?xml version="1.0" encoding="iso-8859-1"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.sf.net/xsd/netconvertConfiguration.xsd">
<input>
<type-files value="erlangen.edgetypes.xml"/>
<osm-files value="erlangen.osm"/>
</input>
<output>
<output-file value="erlangen.net.xml"/>
</output>
<projection>
<proj.utm value="true"/>
</projection>
<edge_removal>
<remove-edges.isolated value="true"/>
</edge_removal>
<processing>
<osm.discard-tls value="true"/>
<no-turnarounds value="false"/>
<offset.disable-normalization value="true"/>
<roundabouts.guess value="true"/>
<junctions.join value="true"/>
</processing>
</configuration>
-->
which mentions all the information asked for (hopefully). The route file has no such header, so I suppose, it is handmade.
Related
I have logback-spring.xml that contains my configuration and I have another file log.properties that I put values that I am using in logback-spring.xml in it and added to my logback-spring.xml by using <property resource= /> tag.
what I need is to retrieve the value for this property tag from application.properties, right now I directly use the address <property resource="config/properties/log.properties" />
following is the structure of files:
-- src/main/resources
----- config
-------- logging
----------- logback-spring.xml
-------- properties
----------- log.properties
-------- application.properties
As I read other questions I tried some of them but they didn't work, I tried the following solutions:
I added log.properties=classpath:config/properties/log.properties to application.properties and then added <property resource="${log.properties}" /> tag to logback-spring.xml but it didn't work.
then I tried these two tags together
<property resource="application.properties" />
<property resource="${log.properties}" />
unfortunately still no chance, I am wondering if it is possible at all or not, if I can't retrieve a valuer for <property/> tag from application.properties then how I can externalize this hard-coded value?
I found that the problem was with addresses so I changed the value in my logback-spring.xml and application.properties as follow:
log.properties
<property resource="config/application.properties" />
application.properties
log.properties=config/properties/log.properties
It is now working fine but still, I am not sure it is a good practice to have two <property> tags in logback-spring.xml or there is a better way to do this?
Our project structure regarding the logback.xmls looks like this:
src\main\resources\logback.xml
src\main\resources\config\dev\logback.xml
src\main\resources\config\sjngm\dev\logback.xml
src\main\resources\config\int\logback.xml
src\main\resources\config\local\logback.xml
src\main\resources\config\prod\logback.xml
where the first one references to the environment specific one:
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds">
<contextName>sjngm</contextName>
<jmxConfigurator />
<include resource="config/${extra}${env:-local}/logback.xml" />
</configuration>
Note that extra is not defined most of the times, which is why used this for a while:
<include resource="config/${extra:-}${env:-local}/logback.xml" />
This stopped working at one point, can't remember which version of logback. So we changed it to
<include resource="config/${extra:-./}${env:-local}/logback.xml" />
which also worked for quite a while.
Now we switched to Spring Boot 1.5.4 (contains logback-classic 1.1.11 and logback-core 1.1.11) and it stopped working again. The latest error message is:
11:08:15,020 |-WARN in ch.qos.logback.core.joran.action.IncludeAction - Could not find resource corresponding to [config/./local/logback.xml]
If I go back to
<include resource="config/${extra:-}${env:-local}/logback.xml" />
the message is
11:19:28,778 |-WARN in ch.qos.logback.core.joran.action.IncludeAction - Could not find resource corresponding to [config/extra_IS_UNDEFINEDlocal/logback.xml]
Note that logback still uses "local" as a default string for env, so not all is broken.
What do I do now? Basically I want to tell logback that I want an empty string where extra would be.
This also doesn't work:
<property name="defaultExtra" value="" />
<include resource="config/${extra:-${defaultExtra}}${env:-local}/logback.xml" />
as an empty string seems to always result in an undefined property.
The only working thing I can come up with is this:
<if condition='isDefined("extra")'>
<then>
<include resource="config/${extra}${env:-local}/logback.xml" />
</then>
<else>
<include resource="config/${env:-local}/logback.xml" />
</else>
</if>
plus this into the pom.xml:
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
</dependency>
Isn't this nice?! So why did they have to break what was working nicely???
This worked for me:
<property name="extra" value="${logback.myApp.extra:- }" />
Logback seems to trim Whitespace out of the value. So the default value of Space did the trick.
Embedded Whitespace is preserved, which may lead to a FileNotFoundException if Tabs were embedded, but embedded Spaces were ok.
Setting a Property in a Java Initialiser had the desired effect:
System.setProperty("logback.myApp.extra", "\t \tEXTRA_EXTRA_EXTRA\t \t");
The Tabs & Spaces were removed from the Property, which was assigned the value EXTRA_EXTRA_EXTRA
(the Java Initialiser must be invoked before any Logging has taken place & may contain no Logging itself)
You could of course set the Property on the Java Command line.
P.S. if the Property is undefined & you omit the Space (${logback.myApp.extra:-}), it is assigned the value:
logback.myApp.extra_IS_UNDEFINED
...so it may be wise to add a suitable comment:
<property name="extra" value="${logback.myApp.extra:- }" /><!-- N.B. Empty Default value must contain # least 1 Space!! -->
I'm creating reports, but steps are not included (look at screenshoot in the end of question!).
I've created ClassLibrary1 project in VS15
I've added NUnit3, NUnitConsole, Specflow and Specflow.NUnit nuget packages.
I've added defaul feature and step definition files.
After that, I ran these commands from cmd(first from nunit folder, second from specflow folder):
nunit3-console.exe --labels=All --out=TestResult.txt "--result=TestResult.xml;format=nunit2" D:\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll
specflow.exe nunitexecutionreport D:\Projects\ClassLibrary1\ClassLibrary1\ClassLibrary1.csproj /out:MyResult.html
As I see, steps are not included in output HTML file... I remember that it was working in previous versions, and i saw examples with button like 'expand', which should help to see exact steps been performed in scenario.
What do i miss?
TestResult.txt is
=> ClassLibrary1.SpecFlowFeature1Feature.AddTwoNumbers
Given I have entered 50 into the calculator
-> pending: StepDefinition1.GivenIHaveEnteredSomethingIntoTheCalculator(50)
And I have entered 70 into the calculator
-> skipped because of previous errors
When I press add
-> skipped because of previous errors
Then the result should be 120 on the screen
-> skipped because of previous errors
TestResult.xml is
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="D:\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll" total="1" errors="0" failures="0" not-run="0" inconclusive="1" ignored="0" skipped="0" invalid="0" date="2017-02-28" time="12:37:46">
<environment nunit-version="3.5.0.0" clr-version="4.0.30319.42000" os-version="Microsoft Windows NT 10.0.14393.0" platform="Win32NT" cwd="D:\Projects\ClassLibrary1\packages\NUnit.ConsoleRunner.3.6.0\tools" machine-name="DESKTOP-417JV6U" user="dom" user-domain="DESKTOP-417JV6U" />
<culture-info current-culture="en-US" current-uiculture="en-US" />
<test-suite type="Assembly" name="D:\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll" executed="True" result="Success" success="True" time="0.386" asserts="0">
<properties>
<property name="_PID" value="25444" />
<property name="_APPDOMAIN" value="domain-" />
</properties>
<results>
<test-suite type="TestSuite" name="ClassLibrary1" executed="True" result="Success" success="True" time="0.379" asserts="0">
<results>
<test-suite type="TestFixture" name="SpecFlowFeature1Feature" description="SpecFlowFeature1" executed="True" result="Success" success="True" time="0.378" asserts="0">
<properties>
<property name="Description" value="SpecFlowFeature1" />
</properties>
<results>
<test-case name="ClassLibrary1.SpecFlowFeature1Feature.AddTwoNumbers" description="Add two numbers" executed="True" result="Inconclusive" success="False" time="0.118" asserts="0">
<categories>
<category name="mytag" />
</categories>
<properties>
<property name="Description" value="Add two numbers" />
</properties>
<reason>
<message><![CDATA[One or more step definitions are not implemented yet.
StepDefinition1.GivenIHaveEnteredSomethingIntoTheCalculator(50)]]></message>
</reason>
</test-case>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</test-results>
Output html looks like:
You can generate the step definitions by right-clicking on the feature's text and selecting "Generate Step Definitions"
This will generate the Steps class but it will have only stub methods that throw a NotImplementedException.
I'm trying to trigger a custom build using the TeamCity 8.1 REST API (see https://confluence.jetbrains.com/display/TCD8/REST+API#RESTAPI-TriggeringaBuild). My builds run fine and I'm able to specify custom branches and properties with no issue. My goal is now to specify a custom artifact dependency for the builds I'm triggering.
The response I receive when creating a build is something like the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<build taskId="1234" buildTypeId="buildConfig1" state="queued" ...>
<buildType id="buildConfig1" name="Build Config Name" ... />
...
<properties count="1">
<property name="testParam" value="Test 123" own="true" />
</properties>
<custom-artifact-dependencies />
</build>
The "custom-artifact-dependencies" tag in this response leads me to believe that there is a way to specify custom dependencies, but I have not found anything in the TeamCity documentation, the TeamCity forums, or from Google explaining how this can be accomplished. Is there something I'm overlooking here or another way of accomplishing this?
Adding the following to as a child of the "build" tag results in an "Artifact dependency should have type 'artifact_dependency'." error:
<custom-artifact-dependencies>
<artifact-dependency buildId="5432" buildTypeId="parentBuildConfig"/>
</custom-artifact-dependencies>
The server may be confusing my intention with the build configuration API for setting and viewing artifact dependencies (e.g. http://teamcity:8111/httpAuth/app/rest/buildTypes/<buildTypeLocator>/artifact-dependencies/)
I had the same problem
This is what worked for me:
<build>
<triggeringOptions queueAtTop="true"/>
<buildType id="buildConfig1"/>
<custom-artifact-dependencies count="1">
<artifact-dependency id="0" type="artifact_dependency">
<properties>
<property name="pathRules" value="Artifacts_1.zip
Artifacts_2.zip
Artifacts_To_Unzip.zip!/**
"/>
<property name="cleanDestinationDirectory" value="true"/>
<property name="revisionName" value="buildId"/>
<property name="revisionValue" value="5432"/>
</properties>
<source-buildType id="parentBuildConfig" />
</artifact-dependency>
</custom-artifact-dependencies>
</build>
If the 'parentBuildConfig' build is still running, replace the buildId parameter with taskId
Background
I'm putting together a Continuous Integration system at work on two VMs running on my local desktop. VM #1 (Toolbox) is running CruiseControl.Net, Subversion, BugTracker.Net and SQL Server Express. VM #2 (BuildMaster) is running NAnt with NAntContrib and has VB 6.0 and the 1.0/1.1/2.0/3.5 .Net Framework SDKs installed. The intent is to tightly control what's installed on BuildMaster and be much looser on Toolbox and developer workstations.
Issue
I had a CCNet project on Toolbox that successfully compiled a test VB 6.0 application on BuildMaster, but the build started failing last week. The only thing I remember doing was install BugTracker.Net and SQL Server Express on Toolbox.
Symptoms
The build fails and returns an exception:
<![CDATA[Starting 'vb6 ( /make "\\buildmaster\Working\TestApp\TestApp.vbp" /outdir "\\buildmaster\Working\TestApp\build" /out "\\buildmaster\Working\TestApp\TestApp.build.err")' in '\\buildmaster\Working\TestApp']]></message><duration>711.02240000000006</duration></task><duration>761.09440000000006</duration></target><failure><builderror><type>NAnt.Core.BuildException</type><message><![CDATA['vb6' failed to start.]]></message><location><filename>\\buildmaster\Working\TestApp\TestApp.build</filename><linenumber>39</linenumber><columnnumber>4</columnnumber></location><stacktrace><![CDATA[ at NAnt.Core.Tasks.ExternalProgramBase.StartProcess() in c:\Nant\src\NAnt.Core\Tasks\ExternalProgramBase.cs:line 501
at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask() in c:\Nant\src\NAnt.Core\Tasks\ExternalProgramBase.cs:line 386
at NAnt.Contrib.Tasks.Vb6Task.ExecuteTask() in c:\Nant\contrib\src\Tasks\Vb6Task.cs:line 220
at NAnt.Core.Task.Execute() in c:\Nant\src\NAnt.Core\Task.cs:line 186
at NAnt.Core.Target.Execute() in c:\Nant\src\NAnt.Core\Target.cs:line 247
at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in c:\Nant\src\NAnt.Core\Project.cs:line 910
at NAnt.Core.Project.Execute() in c:\Nant\src\NAnt.Core\Project.cs:line 862
at NAnt.Core.Project.Run() in c:\Nant\src\NAnt.Core\Project.cs:line 947]]></stacktrace><internalerror><type>System.ComponentModel.Win32Exception</type><message><![CDATA[The system cannot find the file specified]]></message><stacktrace><![CDATA[ at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at NAnt.Core.Tasks.ExternalProgramBase.StartProcess() in c:\Nant\src\NAnt.Core\Tasks\ExternalProgramBase.cs:line 498]]></stacktrace></internalerror></builderror></failure><duration>1211.7424</duration></buildresults>
Obviously, the meat of the exception is [CDATA['vb6' failed to start.]]. My problem is that when I run the Nant build directly on BuildMaster it completes the build successfully every time.
For the sake of completeness, here's my NAnt build script:
<?xml version="1.0" ?>
<project name="TestApp" default="build">
<!-- set build.date property to current date in format yyyy-MM-dd -->
<tstamp property="build.date" pattern="yyyy-MM-dd" />
<!-- global project settings -->
<property name="project.name" value="TestApp" />
<property name="project.version" value="1.00" unless="${property::exists('project.version')}" />
<property name="project.release.type" value="release" unless="${property::exists('project.release.type')}" /> <!-- nightly / dev / alpha / beta# / rc# / release -->
<property name="build.warnaserror" value="false" />
<!-- default configuration -->
<property name="project.client" value="" />
<property name="build.defines" value="" />
<property name="build.number" value="${math::abs(math::floor(timespan::get-total-days(datetime::now() - datetime::parse('01/01/2000'))))}" />
<!-- platform specific properties. These are the defaults -->
<property name="current.build.defines" value="${build.defines}" />
<!-- Build Tasks -->
<target name="init" description="Initializes build properties">
<property name="build.dir" value="${project::get-base-directory()}\build" />
<echo message="Build Directory is ${build.dir}" />
</target>
<target name="clean" depends="init" description="Deletes current build configuration">
<echo message="Clearing out files before recompiling..." />
<delete verbose="true">
<fileset basedir="${build.dir}">
<include name="TestApp*.exe" />
</fileset>
</delete>
</target>
<target name="build" depends="clean" description="Perform a build of the base TestApp product">
<mkdir dir="${build.dir}" unless="${directory::exists(build.dir)}" />
<!-- Actually compile VB6 project into executable -->
<vb6 project="TestApp.vbp" outdir="${build.dir}" errorfile="TestApp.build.err" verbose="true" />
</target>
</project>
Your help is greatly appreciated!
I might be misinterpreting your question so please bear with me. CCNet's nant task operatates on the local machine (the machine running CCNet).
If ToolBox is running CCNet but BuildMaster is running all tools (i.e. VB6, etc), I'm fairly sure there no way to do what's being attempted. Generally, CCNet needs to be running on the machine actually performing the builds. Therefore, the fact that VB6 cannot be found is because VB6 is not installed on ToolBox.
However, CCNet does have a way to monitor/control multiple build servers from one. So in your case you could configure ToolBox to control BuildMaster's builds, but CCNet would need to be installed on both. For a reference on something like this you can check out Splitting the build on CCNet's site.