Skip to content

Commit

Permalink
Applied updates and worked on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Oct 3, 2020
1 parent 207ed4f commit 5c4d285
Show file tree
Hide file tree
Showing 45 changed files with 7,799 additions and 320 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Files to ignore by git
#
# Version: 20191220
# Version: 20200912

# Generic auto-generated build files
*~
Expand Down Expand Up @@ -61,6 +61,7 @@ stamp-h[1-9]
/m4/gettext.m4
/m4/glibc21.m4
/m4/glibc2.m4
/m4/host-cpu-c-abi.m4
/m4/iconv.m4
/m4/intdiv0.m4
/m4/intldir.m4
Expand Down Expand Up @@ -134,7 +135,9 @@ stamp-h[1-9]
/ewftools/ewfrecover
/ewftools/ewfverify
/tests/*.exe
/tests/ewf_test_handle
/tests/ewf_test_glob
/tests/ewf_test_handle
/tests/ewf_test_open_close
/tests/ewf_test_read
/tests/ewf_test_read_chunk
Expand All @@ -146,6 +149,7 @@ stamp-h[1-9]
/tests/ewf_test_write
/tests/ewf_test_write_chunk
/tests/input
/tests/input2
/tests/input_delta
/tests/input_error
/tests/input_logical
Expand Down
81 changes: 22 additions & 59 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
version: ~> 1.0
language: c
matrix:
arch: amd64
os: linux
dist: bionic
jobs:
include:
- name: "Linux with clang"
env:
Expand All @@ -8,9 +12,6 @@ matrix:
- LDFLAGS="--coverage"
- TARGET="linux-clang"
compiler: clang
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc"
env:
Expand All @@ -19,35 +20,32 @@ matrix:
- LDFLAGS="--coverage"
- TARGET="linux-gcc"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc on s390x (Docker)"
- name: "Linux with gcc on ppc64le"
env:
- DOCKERHUB_REPO="s390x/ubuntu"
- DOCKERHUB_TAG="bionic"
- CONFIGURE_OPTIONS=""
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="docker"
- TARGET="linux-gcc"
arch: ppc64le
compiler: gcc
group: edge
- name: "Linux with gcc on s390x"
env:
- CONFIGURE_OPTIONS=""
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc"
arch: s390x
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
services:
- docker
- name: "Linux with gcc and wide character type (wchar_t) support"
env:
- CONFIGURE_OPTIONS="--enable-wide-character-type"
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-wide-character-type"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc without optimization"
env:
Expand All @@ -57,9 +55,6 @@ matrix:
- LDFLAGS="--coverage"
- TARGET="linux-gcc-no-optimization"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc without OpenSSL"
env:
Expand All @@ -68,9 +63,6 @@ matrix:
- LDFLAGS="--coverage"
- TARGET="linux-gcc-no-openssl"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc with OpenSSL EVP"
env:
Expand All @@ -79,9 +71,6 @@ matrix:
- LDFLAGS="--coverage"
- TARGET="linux-gcc-openssl-evp"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc with OpenSSL non-EVP"
env:
Expand All @@ -90,9 +79,6 @@ matrix:
- LDFLAGS="--coverage"
- TARGET="linux-gcc-openssl"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python module"
env:
Expand All @@ -101,9 +87,6 @@ matrix:
- LDFLAGS="--coverage"
- TARGET="linux-gcc-python"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 2 module"
env:
Expand All @@ -113,9 +96,6 @@ matrix:
- PYTHON_VERSION=2
- TARGET="linux-gcc-python2"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 3 module"
env:
Expand All @@ -125,38 +105,26 @@ matrix:
- PYTHON_VERSION=3
- TARGET="linux-gcc-python3"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 2 module (setup.py)"
env:
- TARGET="linux-gcc-python-setup-py"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
python: 2.7
- name: "Linux with gcc and Python 3 module (setup.py)"
env:
- TARGET="linux-gcc-python-setup-py"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
python: 3.4
python: 3.6
- name: "Linux with gcc and shared libraries"
env:
- CONFIGURE_OPTIONS=""
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-shared"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc, shared libraries and wide character type (wchar_t) support"
env:
Expand All @@ -165,20 +133,14 @@ matrix:
- LDFLAGS="--coverage"
- TARGET="linux-gcc-shared-wide-character-type"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and static executables support"
env:
- CONFIGURE_OPTIONS="--enable-static-executables"
- CONFIGURE_OPTIONS="--enable-static-executables=yes --enable-multi-threading-support=no"
- CFLAGS="--coverage"
- LDFLAGS="--coverage"
- TARGET="linux-gcc-static-executables"
compiler: gcc
os: linux
dist: xenial
sudo: required
group: edge
- name: "Mac OS 10.14 with clang"
env:
Expand Down Expand Up @@ -222,7 +184,7 @@ matrix:
os: osx
osx_image: xcode11
language: shell
- name: "Mac OS 10.14 gcc and Python module and pkgbuild"
- name: "Mac OS 10.14 with gcc and Python module and pkgbuild"
env:
- CONFIGURE_OPTIONS="--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix"
- TARGET="macos-gcc-pkgbuild"
Expand All @@ -237,7 +199,8 @@ script:
- .travis/script.sh
after_success:
- if test ${TARGET} = "linux-gcc-no-optimization"; then
curl -o codecov.sh -s https://codecov.io/bash && sed 's/ -execdir / -exec /' -i ./codecov.sh && /bin/bash ./codecov.sh -n ${TARGET} -y .codecov.yml;
for DIRECTORY in `find . -maxdepth 1 -type d`; do (cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) done;
curl -o codecov.sh -s https://codecov.io/bash && /bin/bash ./codecov.sh -n ${TARGET} -X gcov;
fi
- if test ${TARGET} = "macos-gcc-python-setup-py38" && test -n "${TRAVIS_TAG}"; then
python3 -m twine upload dist/*.whl --username __token__ --password ${PYPI_TOKEN} --skip-existing;
Expand Down
27 changes: 12 additions & 15 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
#!/bin/sh
# Script to run before_install step on Travis-CI
#
# Version: 20191209
# Version: 20200926

# Exit on error.
set -e;

if test ${TARGET} = "docker";
if test ${TRAVIS_OS_NAME} = "linux";
then
sudo apt-get update;
sudo apt-mark hold mysql-server-5.7 postgresql-9.4 postgresql-client-9.4 postgresql-9.5 postgresql-client-9.5 postgresql-9.6 postgresql-client-9.6 postgresql-10 postgresql-client-10;
sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y --allow-unauthenticated;

sudo apt-get install -y qemu-user-static;

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes;

elif test ${TRAVIS_OS_NAME} = "linux";
then
sudo apt-get update;
sudo apt-mark hold mysql-server-5.7 postgresql-9.4 postgresql-client-9.4 postgresql-9.5 postgresql-client-9.5 postgresql-9.6 postgresql-client-9.6 postgresql-10 postgresql-client-10;
sudo apt-mark hold mysql-server-5.7 postgresql-10 postgresql-client-10;
sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y --allow-unauthenticated;

sudo apt-get install -y autoconf automake autopoint build-essential byacc flex git libfuse-dev libssl-dev libtool pkg-config zlib1g-dev;

elif test ${TRAVIS_OS_NAME} = "osx";
then
brew update
# Prevent from the 30 days autoclean being triggered on install.
export HOMEBREW_NO_INSTALL_CLEANUP=1;

brew update;

brew install gettext gnu-sed;
brew link --force gettext;

brew tap homebrew/cask;
brew cask install osxfuse;
Expand All @@ -40,3 +32,8 @@ then
fi
fi

if test ${TARGET} = "coverity";
then
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-;
fi

34 changes: 16 additions & 18 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
#!/bin/sh
# Script to run install step on Travis-CI
#
# Version: 20190802
# Version: 20200926

# Exit on error.
set -e;

if test ${TARGET} != "docker";
if test ${TRAVIS_OS_NAME} = "osx";
then
if test ${TRAVIS_OS_NAME} = "osx";
then
export SED="/usr/local/bin/gsed";
fi
export PATH="/usr/local/opt/gettext/bin:$PATH";
export SED="/usr/local/bin/gsed";
fi

./synclibs.sh --use-head;
./autogen.sh;
./synclibs.sh --use-head;
./autogen.sh;

if test ${TARGET} = "linux-gcc-shared" || test ${TARGET} = "linux-gcc-shared-wide-character-type";
then
./configure > /dev/null;
make > /dev/null;
if test ${TARGET} = "linux-gcc-shared" || test ${TARGET} = "linux-gcc-shared-wide-character-type";
then
./configure > /dev/null;
make > /dev/null;

./syncsharedlibs.sh --use-head;
fi
./syncsharedlibs.sh --use-head;
fi

if test -x "synctestdata.sh";
then
./synctestdata.sh;
fi
if test -x "synctestdata.sh";
then
./synctestdata.sh;
fi

13 changes: 10 additions & 3 deletions .travis/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ if test ${RESULT} -eq 0;
then
if test ${TARGET} = "macos-gcc-python" || test ${TARGET} = "macos-gcc-pkgbuild";
then
install_name_tool -change /usr/local/lib/libewf.1.dylib ${PWD}/libewf/.libs/libewf.1.dylib ./pyewf/.libs/pyewf.so;
install_name_tool -change /usr/local/lib/libewf.2.dylib ${PWD}/libewf/.libs/libewf.2.dylib ./pyewf/.libs/pyewf.so;
fi
if test ${TARGET} = "linux-gcc-no-optimization";
then
# Skip the tools end-to-end tests otherwise gcov will not generate the reports properly.
make check CHECK_WITH_STDERR=1 SKIP_TOOLS_END_TO_END_TESTS=1;
RESULT=$?;
else
make check CHECK_WITH_STDERR=1;
RESULT=$?;
fi
make check CHECK_WITH_STDERR=1;
RESULT=$?;
fi
if test ${RESULT} -ne 0;
then
Expand Down
8 changes: 2 additions & 6 deletions .travis/script.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# Script to run script step on Travis-CI
#
# Version: 20191209
# Version: 20200926

# Exit on error.
set -e;
Expand All @@ -11,11 +11,7 @@ then
export PATH=$(echo $PATH | tr ":" "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s/::/:/g");
fi

if test ${TARGET} = "docker";
then
docker run -t -v "${PWD}:/libewf" ${DOCKERHUB_REPO}:${DOCKERHUB_TAG} sh -c "cd libewf && .travis/script_docker.sh";

elif test ${TARGET} = "linux-gcc-python-setup-py" || test ${TARGET} = "macos-gcc-python-setup-py";
if test ${TARGET} = "linux-gcc-python-setup-py" || test ${TARGET} = "macos-gcc-python-setup-py";
then
./configure ${CONFIGURE_OPTIONS};
make > /dev/null;
Expand Down
7 changes: 6 additions & 1 deletion .travis/script_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,10 @@ export LANG="en_US.UTF-8";

./autogen.sh;

.travis/runtests.sh;
# Disabled since this times out
# .travis/runtests.sh;

./configure

make > /dev/null;

Loading

0 comments on commit 5c4d285

Please sign in to comment.