Skip to content

Commit

Permalink
CI: test encoding inside OSX job
Browse files Browse the repository at this point in the history
  • Loading branch information
claudioandre-br committed Nov 30, 2017
1 parent edf5c17 commit 55786e8
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .travis/test.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
#!/bin/sh -e

do_test_encoding() {
echo "Testing $1"
../run/john -test-full=0 --format="$1" --encoding=utf8
echo
../run/john -test-full=0 --format="$1" --encoding=cp737
echo "Done $1"
}

# There is a bug in echo -e in Travis
echo '[Local:Disabled:Formats]' > john-local.conf
echo 'Raw-SHA512-free-opencl = Y' >> john-local.conf
echo 'XSHA512-free-opencl = Y' >> john-local.conf
echo 'gpg-opencl = Y' >> john-local.conf

if test "$1" = "encoding" ; then
../run/john -test-full=0 --format=cpu --encoding=utf8
echo
../run/john -test-full=0 --format=cpu --encoding=cp737
do_test_encoding cpu

if test "$OPENCL" = "yes" ; then
../run/john -test-full=0 --format=opencl --encoding=utf8
echo
../run/john -test-full=0 --format=opencl --encoding=cp737
do_test_encoding opencl
fi
else

Expand All @@ -25,8 +29,16 @@ else
../run/john -test-full=0 --format=cpu
fi

if test "$TRAVIS_OS_NAME" = "osx" ; then
do_test_encoding cpu
fi

if test "$OPENCL" = "yes" ; then
../run/john -test-full=0 --format=opencl

if test "$TRAVIS_OS_NAME" = "osx" ; then
do_test_encoding opencl
fi
fi
fi

0 comments on commit 55786e8

Please sign in to comment.