mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
core unit tests working
This commit is contained in:
parent
5f3601c36f
commit
a73fac0e07
@ -315,35 +315,13 @@
|
||||
More information in Jira: 6970.
|
||||
-->
|
||||
<target name="unit-test-path-simplification" depends="projectized-common.test-init">
|
||||
<property name="unit-test-path-simplification.dir.path" value="${thirdparty.dir}/ClasspathSimplification/target"/>
|
||||
<property name="unit-test-path-simplification.jar.path" value="${unit-test-path-simplification.dir.path}/ClasspathSimplification-1.0-jar-with-dependencies.jar"/>
|
||||
<taskdef name="classpathsimplify" classname="org.sleuthkit.autopsy.classpathsimplification.ClasspathSimplification" classpath="${unit-test-path-simplification.jar.path}"/>
|
||||
|
||||
|
||||
<sequential>
|
||||
<script language="javascript">
|
||||
<![CDATA[
|
||||
var moduleRunClasspath = project.getProperty("module.run.classpath");
|
||||
|
||||
var directories = [];
|
||||
// searches for jar file parent directories with path separators of \ or /
|
||||
var individualPathRegex = /^\s*(.+?[\\\/])[^\\\/]+?\.jar\s*$/i;
|
||||
// split on ':' but not 'C:\'
|
||||
var classPathRegex = /((C:\\)?.+?)(:|$)/gi;
|
||||
var match;
|
||||
while((match = classPathRegex.exec(moduleRunClasspath)) !== null) {
|
||||
var thisPath = match[1];
|
||||
var pathMatch = thisPath.match(individualPathRegex);
|
||||
// find unique matches
|
||||
if (pathMatch && directories.indexOf(pathMatch[1]) < 0) {
|
||||
directories.push(pathMatch[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// suffix with *
|
||||
for (var i = 0; i < directories.length; i++) {
|
||||
directories[i] = directories[i] + "*";
|
||||
}
|
||||
|
||||
// set project property
|
||||
project.setNewProperty("test.unit.abbreviatedModuleRunClassPath", directories.join(":"));
|
||||
]]>
|
||||
</script>
|
||||
<classpathsimplify classpath="${module.run.classpath}" outputprop="test.unit.abbreviatedModuleRunClassPath" />
|
||||
|
||||
<!--grab properties from common.xml:test-init so that "test.unit.run.cp" can be properly formed-->
|
||||
<property name="build.test.unit.dir" location="${build.dir}/test/unit"/>
|
||||
|
@ -4,10 +4,10 @@
|
||||
<conf name="coretestlibs"/>
|
||||
</configurations>
|
||||
<dependencies >
|
||||
<dependency conf="coretestlibs->default" org="org.mockito" name="mockito-core" rev="3.5.7"/>
|
||||
<dependency conf="coretestlibs->default" org="net.bytebuddy" name="byte-buddy" rev="1.10.13"/>
|
||||
<dependency conf="coretestlibs->default" org="net.bytebuddy" name="byte-buddy-agent" rev="1.10.13"/>
|
||||
<dependency conf="coretestlibs->default" org="org.objenesis" name="objenesis" rev="3.1"/>
|
||||
<dependency conf="coretestlibs->default" org="org.mockito" name="mockito-core" rev="4.8.1"/>
|
||||
<dependency conf="coretestlibs->default" org="net.bytebuddy" name="byte-buddy" rev="1.12.18"/>
|
||||
<dependency conf="coretestlibs->default" org="net.bytebuddy" name="byte-buddy-agent" rev="1.12.18"/>
|
||||
<dependency conf="coretestlibs->default" org="org.objenesis" name="objenesis" rev="3.3"/>
|
||||
<dependency conf="coretestlibs->default" org="junit" name="junit" rev="4.13.2"/>
|
||||
</dependencies>
|
||||
</ivy-module>
|
@ -2,7 +2,7 @@ file.reference.byte-buddy-1.10.13.jar=release/modules/ext/byte-buddy-1.10.13.jar
|
||||
file.reference.byte-buddy-agent-1.10.13.jar=release/modules/ext/byte-buddy-agent-1.10.13.jar
|
||||
file.reference.hamcrest-core-1.3.jar=release/modules/ext/hamcrest-core-1.3.jar
|
||||
file.reference.junit-4.13.2.jar=release/modules/ext/junit-4.13.2.jar
|
||||
file.reference.mockito-core-3.5.7.jar=release/modules/ext/mockito-core-3.5.7.jar
|
||||
file.reference.mockito-core-4.8.1.jar=release/modules/ext/mockito-core-4.8.1.jar
|
||||
file.reference.objenesis-3.1.jar=release/modules/ext/objenesis-3.1.jar
|
||||
javac.source=11
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
||||
|
@ -44,12 +44,12 @@
|
||||
<package>org.junit.validator</package>
|
||||
</public-packages>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/byte-buddy-1.10.13.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/byte-buddy-1.10.13.jar</binary-origin>
|
||||
<runtime-relative-path>ext/byte-buddy-1.12.18.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/byte-buddy-1.12.18.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/byte-buddy-agent-1.10.13.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/byte-buddy-agent-1.10.13.jar</binary-origin>
|
||||
<runtime-relative-path>ext/byte-buddy-agent-1.12.18.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/byte-buddy-agent-1.12.18.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/hamcrest-core-1.3.jar</runtime-relative-path>
|
||||
@ -60,12 +60,12 @@
|
||||
<binary-origin>release/modules/ext/junit-4.13.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/mockito-core-3.5.7.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/mockito-core-3.5.7.jar</binary-origin>
|
||||
<runtime-relative-path>ext/mockito-core-4.8.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/mockito-core-4.8.1.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/objenesis-3.1.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/objenesis-3.1.jar</binary-origin>
|
||||
<runtime-relative-path>ext/objenesis-3.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/objenesis-3.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
</data>
|
||||
</configuration>
|
||||
|
Loading…
x
Reference in New Issue
Block a user