test integration in appveyor and travis

This commit is contained in:
Greg DiCristofaro 2020-11-02 09:39:20 -05:00
parent 4f12355b89
commit 60e304337e
2 changed files with 35 additions and 1 deletions

View File

@ -42,4 +42,6 @@ build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- cmd: ant -q build
test: off
test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- cmd: ant -q test

View File

@ -9,4 +9,36 @@ pushd bindings/java && ant -q dist && popd
echo "Building Autopsy..." && echo -en 'travis_fold:start:script.build\\r'
cd $TRAVIS_BUILD_DIR/
ant build
build_rc=$?
echo -en 'travis_fold:end:script.build\\r'
# don't continue to test if build failed.
if [[ $build_rc != 0 ]]; then
echo "Build failed. Not continuing to tests."
exit $build_rc
fi
echo "Testing Autopsy..." && echo -en 'travis_fold:start:script.tests\\r'
cd Core/
echo "Testing Autopsy Core..."
echo "Free Space:"
echo `df -h .`
xvfb-run ant -q test
core_test_rc=$?
cd ../KeywordSearch
echo "Testing Autopsy Keyword Search..."
echo "Free Space:"
echo `df -h .`
xvfb-run ant -q test
keywordsearch_test_rc=$?
echo -en 'travis_fold:end:script.tests\\r'
if [ $core_test_rc != 0 ] || [$keywordsearch_test_rc != 0]; then
echo "There was a test failure."
if [$core_test_rc != 0]; then
exit $core_test_rc
elif [$keywordsearch_test_rc != 0]; then
exit $keywordsearch_test_rc
fi
fi