mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Merge pull request #6431 from gdicristofaro/6970-testsInAppVeyorTravis
6970 tests in appveyor / travis
This commit is contained in:
commit
4791bdaacd
@ -6,7 +6,6 @@ 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:
|
||||||
@ -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
|
||||||
|
32
build.xml
32
build.xml
@ -81,6 +81,38 @@
|
|||||||
</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. -->
|
||||||
|
@ -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