Merge pull request #6431 from gdicristofaro/6970-testsInAppVeyorTravis

6970 tests in appveyor / travis
This commit is contained in:
Richard Cordovano 2020-11-12 15:24:28 -05:00 committed by GitHub
commit 4791bdaacd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 35 deletions

View File

@ -6,7 +6,6 @@ cache:
- C:\ProgramData\chocolatey\lib
- '%APPVEYOR_BUILD_FOLDER%\Core\test\qa-functional\data'
image: Visual Studio 2015
platform: x64
environment:
@ -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

View File

@ -81,6 +81,38 @@
</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. -->

View File

@ -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'