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
|
- C:\ProgramData\chocolatey\lib
|
||||||
- '%APPVEYOR_BUILD_FOLDER%\Core\test\qa-functional\data'
|
- '%APPVEYOR_BUILD_FOLDER%\Core\test\qa-functional\data'
|
||||||
|
|
||||||
|
|
||||||
image: Visual Studio 2015
|
image: Visual Studio 2015
|
||||||
platform: x64
|
platform: x64
|
||||||
environment:
|
environment:
|
||||||
global:
|
global:
|
||||||
TSK_HOME: "C:\\sleuthkit"
|
TSK_HOME: "C:\\sleuthkit"
|
||||||
JDK_HOME: C:\Program Files\Java\jdk1.8.0
|
JDK_HOME: C:\Program Files\Java\jdk1.8.0
|
||||||
PYTHON: "C:\\Python36-x64"
|
PYTHON: "C:\\Python36-x64"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: choco install nuget.commandline
|
- ps: choco install nuget.commandline
|
||||||
@ -42,4 +41,6 @@ build_script:
|
|||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
- cmd: ant -q build
|
- 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 . -->
|
<!-- Verify that the java version running is . -->
|
||||||
<fail message="Unsupported Java version: ${ant.java.version}.
|
<fail message="Unsupported Java version: ${ant.java.version}.
|
||||||
Make sure that the Java version is 1.8.0_66 or higher."
|
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 -->
|
<!-- Determine platform and include specific file -->
|
||||||
<condition property="os.family" value="unix">
|
<condition property="os.family" value="unix">
|
||||||
@ -68,22 +68,54 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean" depends="suite.clean">
|
<target name="clean" depends="suite.clean">
|
||||||
<delete includeEmptyDirs="true" failonerror="false">
|
<delete includeEmptyDirs="true" failonerror="false">
|
||||||
<fileset dir="docs\doxygen-user\user-docs" includes="**/*"/>
|
<fileset dir="docs\doxygen-user\user-docs" includes="**/*"/>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete includeEmptyDirs="true" failonerror="false">
|
<delete includeEmptyDirs="true" failonerror="false">
|
||||||
<fileset dir="docs\doxygen\doxygen_docs\api-docs" includes="**/*"/>
|
<fileset dir="docs\doxygen\doxygen_docs\api-docs" includes="**/*"/>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete includeemptydirs="true" failonerror="false">
|
<delete includeemptydirs="true" failonerror="false">
|
||||||
<fileset dir="${basedir}/docs/doxygen-dev/build-docs" includes="**/*"/>
|
<fileset dir="${basedir}/docs/doxygen-dev/build-docs" includes="**/*"/>
|
||||||
</delete>
|
</delete>
|
||||||
</target>
|
</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
|
<!-- 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
|
ZIP target and then opens it up and adds in any files that we want. This is where we customize the
|
||||||
version number. -->
|
version number. -->
|
||||||
<target name="build-zip" depends="doxygen, suite.build-zip"> <!--,findJRE" -->
|
<target name="build-zip" depends="doxygen, suite.build-zip"> <!--,findJRE" -->
|
||||||
|
|
||||||
<property name="release.dir" value="${nbdist.dir}/${app.name}"/>
|
<property name="release.dir" value="${nbdist.dir}/${app.name}"/>
|
||||||
@ -128,15 +160,15 @@
|
|||||||
<!-- for Japanese localized version add option: -Duser.language=ja -->
|
<!-- for Japanese localized version add option: -Duser.language=ja -->
|
||||||
|
|
||||||
|
|
||||||
<if>
|
<if>
|
||||||
<equals arg1="${os.family}" arg2="mac"/>
|
<equals arg1="${os.family}" arg2="mac"/>
|
||||||
<then>
|
<then>
|
||||||
<property name="jvm.options" value=""${jvm-value} -J-Xdock:name=${app.title}""/>
|
<property name="jvm.options" value=""${jvm-value} -J-Xdock:name=${app.title}""/>
|
||||||
</then>
|
</then>
|
||||||
<else>
|
<else>
|
||||||
<property name="jvm.options" value=""${jvm-value}""/>
|
<property name="jvm.options" value=""${jvm-value}""/>
|
||||||
</else>
|
</else>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<propertyfile file="${app.property.file}">
|
<propertyfile file="${app.property.file}">
|
||||||
<!-- Note: can be higher on 64 bit systems, should be in sync with project.properties -->
|
<!-- 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}" />
|
<replace file="${app.property.file}" token="@JVM_OPTIONS" value="${jvm.options}" />
|
||||||
|
|
||||||
<!-- We want to remove the dlls in autopsy/modules/lib because they will
|
<!-- 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.
|
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.
|
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-->
|
This check should do away in the future. Added Sept '13-->
|
||||||
<delete failonerror="false">
|
<delete failonerror="false">
|
||||||
<fileset dir="${zip-tmp}/${app.name}/autopsy/modules/lib">
|
<fileset dir="${zip-tmp}/${app.name}/autopsy/modules/lib">
|
||||||
<include name="libtsk_jni.dll" />
|
<include name="libtsk_jni.dll" />
|
||||||
@ -188,9 +220,9 @@
|
|||||||
|
|
||||||
<target name="input-build-type" unless="build.type">
|
<target name="input-build-type" unless="build.type">
|
||||||
<input addProperty="build.type"
|
<input addProperty="build.type"
|
||||||
message="Enter the desired build type:"
|
message="Enter the desired build type:"
|
||||||
validargs="DEVELOPMENT,RELEASE"
|
validargs="DEVELOPMENT,RELEASE"
|
||||||
defaultvalue="DEVELOPMENT"/>
|
defaultvalue="DEVELOPMENT"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="input-version" unless="app.version">
|
<target name="input-version" unless="app.version">
|
||||||
@ -228,21 +260,21 @@
|
|||||||
<echo>${app.name} branding</echo>
|
<echo>${app.name} branding</echo>
|
||||||
|
|
||||||
<propertyfile
|
<propertyfile
|
||||||
file="${branding.dir}/core/core.jar/org/netbeans/core/startup/Bundle.properties"
|
file="${branding.dir}/core/core.jar/org/netbeans/core/startup/Bundle.properties"
|
||||||
comment="Updated by build script">
|
comment="Updated by build script">
|
||||||
<entry key="currentVersion" value="${app.title} ${app.version}" />
|
<entry key="currentVersion" value="${app.title} ${app.version}" />
|
||||||
</propertyfile>
|
</propertyfile>
|
||||||
|
|
||||||
<propertyfile
|
<propertyfile
|
||||||
file="${branding.dir}/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties"
|
file="${branding.dir}/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties"
|
||||||
comment="Updated by build script">
|
comment="Updated by build script">
|
||||||
<entry key="CTL_MainWindow_Title" value="${app.title} ${app.version}" />
|
<entry key="CTL_MainWindow_Title" value="${app.title} ${app.version}" />
|
||||||
<entry key="CTL_MainWindow_Title_No_Project" value="${app.title} ${app.version}" />
|
<entry key="CTL_MainWindow_Title_No_Project" value="${app.title} ${app.version}" />
|
||||||
</propertyfile>
|
</propertyfile>
|
||||||
|
|
||||||
<propertyfile
|
<propertyfile
|
||||||
file="${basedir}/Core/src/org/sleuthkit/autopsy/coreutils/Version.properties"
|
file="${basedir}/Core/src/org/sleuthkit/autopsy/coreutils/Version.properties"
|
||||||
comment="Updated by build script">
|
comment="Updated by build script">
|
||||||
<entry key="app.name" value="${app.title}" />
|
<entry key="app.name" value="${app.title}" />
|
||||||
<entry key="app.version" value="${app.version}" />
|
<entry key="app.version" value="${app.version}" />
|
||||||
<entry key="build.type" value="${build.type}" />
|
<entry key="build.type" value="${build.type}" />
|
||||||
@ -329,7 +361,7 @@
|
|||||||
<antcall target="build-installer-${os.family}" />
|
<antcall target="build-installer-${os.family}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="chmod_executables" >
|
<target name="chmod_executables" >
|
||||||
<chmod perm="a+x">
|
<chmod perm="a+x">
|
||||||
<fileset dir="${cluster}/markmckinnon" casesensitive="no" id="mm">
|
<fileset dir="${cluster}/markmckinnon" casesensitive="no" id="mm">
|
||||||
<include name="*_linux"/>
|
<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'
|
echo "Building Autopsy..." && echo -en 'travis_fold:start:script.build\\r'
|
||||||
cd $TRAVIS_BUILD_DIR/
|
cd $TRAVIS_BUILD_DIR/
|
||||||
ant build
|
ant -q build
|
||||||
echo -en 'travis_fold:end:script.build\\r'
|
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