Browse Source

[TESTS]: create directory for heapdumps if not exists

Before the heapdump was either written in a file with the
directory name if the heapdump path ended without / or
not written at all if the path ended with /

closes #7645
Britta Weber 11 years ago
parent
commit
59ce940d43
1 changed files with 14 additions and 1 deletions
  1. 14 1
      pom.xml

+ 14 - 1
pom.xml

@@ -39,7 +39,7 @@
         <tests.bwc.path>${project.basedir}/backwards</tests.bwc.path>
         <es.logger.level>INFO</es.logger.level>
         <tests.heap.size>512m</tests.heap.size>
-        <tests.heapdump.path>${basedir}/logs</tests.heapdump.path>
+        <tests.heapdump.path>${basedir}/logs/</tests.heapdump.path>
         <tests.topn>5</tests.topn>
         <execution.hint.file>.local-${project.version}-execution-hints.log</execution.hint.file>
     </properties>
@@ -576,6 +576,19 @@
                             </target>
                         </configuration>
                     </execution>
+                    <execution>
+                        <phase>generate-test-resources</phase>
+                        <id>create-heapdump-directory</id>
+                        <configuration>
+                            <tasks>
+                                <echo message="Creating heapdump directory"/>
+                                <mkdir dir="${tests.heapdump.path}"/>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
                     <execution>
                         <id>tests</id>
                         <phase>test</phase>