mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #6431 from gdicristofaro/6970-testsInAppVeyorTravis
6970 tests in appveyor / travis
This commit is contained in:
commit
4791bdaacd
13
appveyor.yml
13
appveyor.yml
@ -6,14 +6,13 @@ cache:
|
||||
- C:\ProgramData\chocolatey\lib
|
||||
- '%APPVEYOR_BUILD_FOLDER%\Core\test\qa-functional\data'
|
||||
|
||||
|
||||
image: Visual Studio 2015
|
||||
platform: x64
|
||||
environment:
|
||||
global:
|
||||
TSK_HOME: "C:\\sleuthkit"
|
||||
JDK_HOME: C:\Program Files\Java\jdk1.8.0
|
||||
PYTHON: "C:\\Python36-x64"
|
||||
global:
|
||||
TSK_HOME: "C:\\sleuthkit"
|
||||
JDK_HOME: C:\Program Files\Java\jdk1.8.0
|
||||
PYTHON: "C:\\Python36-x64"
|
||||
|
||||
install:
|
||||
- ps: choco install nuget.commandline
|
||||
@ -42,4 +41,6 @@ build_script:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- cmd: ant -q build
|
||||
|
||||
test: off
|
||||
test_script:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- cmd: ant -q test-no-regression
|
||||
|
88
build.xml
88
build.xml
@ -24,7 +24,7 @@
|
||||
<!-- Verify that the java version running is . -->
|
||||
<fail message="Unsupported Java version: ${ant.java.version}.
|
||||
Make sure that the Java version is 1.8.0_66 or higher."
|
||||
unless="supported-java-versions"/>
|
||||
unless="supported-java-versions"/>
|
||||
|
||||
<!-- Determine platform and include specific file -->
|
||||
<condition property="os.family" value="unix">
|
||||
@ -68,22 +68,54 @@
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="suite.clean">
|
||||
<delete includeEmptyDirs="true" failonerror="false">
|
||||
<delete includeEmptyDirs="true" failonerror="false">
|
||||
<fileset dir="docs\doxygen-user\user-docs" includes="**/*"/>
|
||||
</delete>
|
||||
</delete>
|
||||
|
||||
<delete includeEmptyDirs="true" failonerror="false">
|
||||
<fileset dir="docs\doxygen\doxygen_docs\api-docs" includes="**/*"/>
|
||||
</delete>
|
||||
</delete>
|
||||
|
||||
<delete includeemptydirs="true" failonerror="false">
|
||||
<fileset dir="${basedir}/docs/doxygen-dev/build-docs" includes="**/*"/>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- This target is similar to the regular test target that calls test on all nbm's,
|
||||
but this target excludes the Testing nbm which runs the regression tests -->
|
||||
<target name="test-no-regression" depends="build" description="Runs tests for all modules in the suite excluding the regression tests of the Testing NBM.">
|
||||
<!--taken from https://stackoverflow.com/a/10859103; remove "Testing" from the modules and provide 'modulesNoTesting' as result. -->
|
||||
<property name="modulesBeforeChange" value="${modules}"/>
|
||||
<script language="javascript">
|
||||
<![CDATA[
|
||||
var before = project.getProperty("modulesBeforeChange");
|
||||
var separator = ":";
|
||||
var testingNbm = "Testing";
|
||||
var beforeSplit = before.split(separator);
|
||||
var items = [];
|
||||
for (var i = 0; i < beforeSplit.length; i++) {
|
||||
if (beforeSplit[i].toUpperCase() !== testingNbm.toUpperCase()) {
|
||||
items.push(beforeSplit[i]);
|
||||
}
|
||||
}
|
||||
var itemsJoined = items.join(separator);
|
||||
project.setNewProperty("modulesNoTesting", itemsJoined);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<sortsuitemodules unsortedmodules="${modulesNoTesting}" sortedmodulesproperty="modules.test.sorted" sorttests="true"/>
|
||||
<!-- continue on fail -->
|
||||
<property name="continue.after.failing.tests" value="true"/>
|
||||
<subant target="test" buildpath="${modules.test.sorted}" inheritrefs="false" inheritall="false">
|
||||
<property name="cluster.path.evaluated" value="${cluster.path.evaluated}"/> <!-- Just for speed of pre-7.0 projects -->
|
||||
<property name="harness.taskdefs.done" value="${harness.taskdefs.done}"/> <!-- optimization -->
|
||||
<property name="continue.after.failing.tests" value="${continue.after.failing.tests}"/>
|
||||
</subant>
|
||||
</target>
|
||||
|
||||
<!-- This target will create a custom ZIP file for us. It first uses the general
|
||||
ZIP target and then opens it up and adds in any files that we want. This is where we customize the
|
||||
version number. -->
|
||||
ZIP target and then opens it up and adds in any files that we want. This is where we customize the
|
||||
version number. -->
|
||||
<target name="build-zip" depends="doxygen, suite.build-zip"> <!--,findJRE" -->
|
||||
|
||||
<property name="release.dir" value="${nbdist.dir}/${app.name}"/>
|
||||
@ -128,15 +160,15 @@
|
||||
<!-- for Japanese localized version add option: -Duser.language=ja -->
|
||||
|
||||
|
||||
<if>
|
||||
<equals arg1="${os.family}" arg2="mac"/>
|
||||
<then>
|
||||
<property name="jvm.options" value=""${jvm-value} -J-Xdock:name=${app.title}""/>
|
||||
</then>
|
||||
<else>
|
||||
<property name="jvm.options" value=""${jvm-value}""/>
|
||||
</else>
|
||||
</if>
|
||||
<if>
|
||||
<equals arg1="${os.family}" arg2="mac"/>
|
||||
<then>
|
||||
<property name="jvm.options" value=""${jvm-value} -J-Xdock:name=${app.title}""/>
|
||||
</then>
|
||||
<else>
|
||||
<property name="jvm.options" value=""${jvm-value}""/>
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<propertyfile file="${app.property.file}">
|
||||
<!-- Note: can be higher on 64 bit systems, should be in sync with project.properties -->
|
||||
@ -146,9 +178,9 @@
|
||||
<replace file="${app.property.file}" token="@JVM_OPTIONS" value="${jvm.options}" />
|
||||
|
||||
<!-- We want to remove the dlls in autopsy/modules/lib because they will
|
||||
shadow the files in the autopsy/modules/lib/ARCHITECTURE folder in the JAR.
|
||||
These files are legacy from when we used to copy the dlls to this location.
|
||||
This check should do away in the future. Added Sept '13-->
|
||||
shadow the files in the autopsy/modules/lib/ARCHITECTURE folder in the JAR.
|
||||
These files are legacy from when we used to copy the dlls to this location.
|
||||
This check should do away in the future. Added Sept '13-->
|
||||
<delete failonerror="false">
|
||||
<fileset dir="${zip-tmp}/${app.name}/autopsy/modules/lib">
|
||||
<include name="libtsk_jni.dll" />
|
||||
@ -188,9 +220,9 @@
|
||||
|
||||
<target name="input-build-type" unless="build.type">
|
||||
<input addProperty="build.type"
|
||||
message="Enter the desired build type:"
|
||||
validargs="DEVELOPMENT,RELEASE"
|
||||
defaultvalue="DEVELOPMENT"/>
|
||||
message="Enter the desired build type:"
|
||||
validargs="DEVELOPMENT,RELEASE"
|
||||
defaultvalue="DEVELOPMENT"/>
|
||||
</target>
|
||||
|
||||
<target name="input-version" unless="app.version">
|
||||
@ -228,21 +260,21 @@
|
||||
<echo>${app.name} branding</echo>
|
||||
|
||||
<propertyfile
|
||||
file="${branding.dir}/core/core.jar/org/netbeans/core/startup/Bundle.properties"
|
||||
comment="Updated by build script">
|
||||
file="${branding.dir}/core/core.jar/org/netbeans/core/startup/Bundle.properties"
|
||||
comment="Updated by build script">
|
||||
<entry key="currentVersion" value="${app.title} ${app.version}" />
|
||||
</propertyfile>
|
||||
|
||||
<propertyfile
|
||||
file="${branding.dir}/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties"
|
||||
comment="Updated by build script">
|
||||
file="${branding.dir}/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties"
|
||||
comment="Updated by build script">
|
||||
<entry key="CTL_MainWindow_Title" value="${app.title} ${app.version}" />
|
||||
<entry key="CTL_MainWindow_Title_No_Project" value="${app.title} ${app.version}" />
|
||||
</propertyfile>
|
||||
|
||||
<propertyfile
|
||||
file="${basedir}/Core/src/org/sleuthkit/autopsy/coreutils/Version.properties"
|
||||
comment="Updated by build script">
|
||||
file="${basedir}/Core/src/org/sleuthkit/autopsy/coreutils/Version.properties"
|
||||
comment="Updated by build script">
|
||||
<entry key="app.name" value="${app.title}" />
|
||||
<entry key="app.version" value="${app.version}" />
|
||||
<entry key="build.type" value="${build.type}" />
|
||||
@ -329,7 +361,7 @@
|
||||
<antcall target="build-installer-${os.family}" />
|
||||
</target>
|
||||
|
||||
<target name="chmod_executables" >
|
||||
<target name="chmod_executables" >
|
||||
<chmod perm="a+x">
|
||||
<fileset dir="${cluster}/markmckinnon" casesensitive="no" id="mm">
|
||||
<include name="*_linux"/>
|
||||
|
@ -8,5 +8,19 @@ pushd bindings/java && ant -q dist && popd
|
||||
|
||||
echo "Building Autopsy..." && echo -en 'travis_fold:start:script.build\\r'
|
||||
cd $TRAVIS_BUILD_DIR/
|
||||
ant build
|
||||
ant -q build
|
||||
echo -en 'travis_fold:end:script.build\\r'
|
||||
|
||||
echo "Testing Autopsy..." && echo -en 'travis_fold:start:script.tests\\r'
|
||||
echo "Free Space:"
|
||||
echo `df -h .`
|
||||
|
||||
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
# if os x, just run it
|
||||
ant -q test-no-regression
|
||||
elif [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
# if linux use xvfb
|
||||
xvfb-run ant -q test-no-regression
|
||||
fi
|
||||
|
||||
echo -en 'travis_fold:end:script.tests\\r'
|
||||
|
Loading…
x
Reference in New Issue
Block a user