Skip to content
Permalink
Browse files

Updated test scripts (#368)

  • Loading branch information
joachimmetz committed Dec 10, 2019
1 parent 6bb4632 commit 13de2ea4938f6726f18056c99eee78659bd72422
Showing with 35 additions and 57 deletions.
  1. +12 −12 .travis.yml
  2. +12 −7 appveyor.yml
  3. +5 −25 config/travis/install.sh
  4. +6 −13 config/travis/runtests.sh
@@ -10,8 +10,8 @@ matrix:
python: 3.6
services:
- docker
- name: "Fedora Core 29 (Docker) with Python 2.7"
env: FEDORA_VERSION="29"
- name: "Fedora Core 30 (Docker) with Python 2.7"
env: FEDORA_VERSION="30"
os: linux
dist: xenial
sudo: required
@@ -20,8 +20,8 @@ matrix:
python: 2.7
services:
- docker
- name: "Fedora Core 29 (Docker) with Python 3.7"
env: FEDORA_VERSION="29"
- name: "Fedora Core 30 (Docker) with Python 3.7"
env: FEDORA_VERSION="30"
os: linux
dist: xenial
sudo: required
@@ -50,7 +50,7 @@ matrix:
python: 3.6
services:
- docker
- name: "Ubuntu Bionic (18.04) (Docker) with Python 2.7 and tox"
- name: "Ubuntu Bionic (18.04) (Docker) with Python 2.7 (tox)"
env: [TOXENV="py27", UBUNTU_VERSION="18.04"]
os: linux
dist: xenial
@@ -60,7 +60,7 @@ matrix:
python: 2.7
services:
- docker
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.4 and tox"
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.4 (tox)"
env: [TOXENV="py34", UBUNTU_VERSION="18.04"]
os: linux
dist: xenial
@@ -70,7 +70,7 @@ matrix:
python: 3.4
services:
- docker
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.5 and tox"
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.5 (tox)"
env: [TOXENV="py35", UBUNTU_VERSION="18.04"]
os: linux
dist: xenial
@@ -80,7 +80,7 @@ matrix:
python: 3.5
services:
- docker
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.6 and tox"
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.6 (tox)"
env: [TOXENV="py36", UBUNTU_VERSION="18.04"]
os: linux
dist: xenial
@@ -90,7 +90,7 @@ matrix:
python: 3.6
services:
- docker
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.7 and tox"
- name: "Ubuntu Bionic (18.04) (Docker) with Python 3.7 (tox)"
env: [TOXENV="py37", UBUNTU_VERSION="18.04"]
os: linux
dist: xenial
@@ -100,10 +100,10 @@ matrix:
python: 3.7
services:
- docker
- name: "MacOS with Python 2.7.10"
env: [TARGET="macos-python27", PYTHONPATH="/Library/Python/2.7/site-packages/"]
- name: "MacOS 10.14 with Python 3.7 (tox)"
env: TOXENV="py37"
os: osx
osx_image: xcode9.2
osx_image: xcode11
language: generic
install:
- ./config/travis/install.sh
@@ -1,34 +1,39 @@
environment:
matrix:
- TARGET: windows_python27
- TARGET: unittests
MACHINE_TYPE: "x86"
PYTHON: "C:\\Python27"
- TARGET: windows_python27
PYTHON_VERSION: "2.7"
- TARGET: unittests
MACHINE_TYPE: "amd64"
PYTHON: "C:\\Python27-x64"
- TARGET: windows_python37
PYTHON_VERSION: "2.7"
- TARGET: unittests
MACHINE_TYPE: "x86"
PYTHON: "C:\\Python37"
- TARGET: windows_python37
PYTHON_VERSION: "3.7"
- TARGET: unittests
MACHINE_TYPE: "amd64"
PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7"

install:
- cmd: '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /release'
- cmd: "%PYTHON%\\python.exe -m pip install --upgrade pip"
- cmd: "%PYTHON%\\python.exe -m pip install pywin32 WMI"
- cmd: "%PYTHON%\\python.exe %PYTHON%\\Scripts\\pywin32_postinstall.py -install"
- cmd: git clone https://github.com/log2timeline/l2tdevtools.git ..\l2tdevtools
- cmd: if [%TARGET%]==[windows_python27] (
- cmd: if [%PYTHON_VERSION%]==[2.7] (
mkdir dependencies &&
set PYTHONPATH=..\l2tdevtools &&
"%PYTHON%\\python.exe" ..\l2tdevtools\tools\update.py --download-directory dependencies --machine-type %MACHINE_TYPE% --msi-targetdir "%PYTHON%" --track dev PyYAML funcsigs mock pbr six )
- cmd: if [%TARGET%]==[windows_python37] (
- cmd: if [%PYTHON_VERSION%]==[3.7] (
mkdir dependencies &&
set PYTHONPATH=..\l2tdevtools &&
"%PYTHON%\\python.exe" ..\l2tdevtools\tools\update.py --download-directory dependencies --machine-type %MACHINE_TYPE% --msi-targetdir "%PYTHON%" --track dev PyYAML mock pbr six )

build: off

test_script:
- cmd: "%PYTHON%\\python.exe run_tests.py"
- cmd: if [%TARGET%]==[unittests] (
"%PYTHON%\\python.exe" run_tests.py )
@@ -5,10 +5,6 @@
# This file is generated by l2tdevtools update-dependencies.py any dependency
# related changes should be made in dependencies.ini.

L2TBINARIES_DEPENDENCIES="PyYAML";

L2TBINARIES_TEST_DEPENDENCIES="funcsigs mock pbr six";

DPKG_PYTHON2_DEPENDENCIES="python-yaml";

DPKG_PYTHON2_TEST_DEPENDENCIES="python-coverage python-funcsigs python-mock python-pbr python-setuptools python-six";
@@ -36,8 +32,8 @@ then

docker run --name=${CONTAINER_NAME} --detach -i registry.fedoraproject.org/fedora:${FEDORA_VERSION};

# Install dnf-plugins-core.
docker exec ${CONTAINER_NAME} dnf install -y dnf-plugins-core;
# Install dnf-plugins-core and langpacks-en.
docker exec ${CONTAINER_NAME} dnf install -y dnf-plugins-core langpacks-en;

# Add additional dnf repositories.
docker exec ${CONTAINER_NAME} dnf copr -y enable @gift/dev;
@@ -128,23 +124,7 @@ then

elif test ${TRAVIS_OS_NAME} = "osx";
then
git clone https://github.com/log2timeline/l2tbinaries.git -b dev;

mv l2tbinaries ../;

for PACKAGE in ${L2TBINARIES_DEPENDENCIES};
do
echo "Installing: ${PACKAGE}";
sudo /usr/bin/hdiutil attach ../l2tbinaries/macos/${PACKAGE}-*.dmg;
sudo /usr/sbin/installer -target / -pkg /Volumes/${PACKAGE}-*.pkg/${PACKAGE}-*.pkg;
sudo /usr/bin/hdiutil detach /Volumes/${PACKAGE}-*.pkg
done

for PACKAGE in ${L2TBINARIES_TEST_DEPENDENCIES};
do
echo "Installing: ${PACKAGE}";
sudo /usr/bin/hdiutil attach ../l2tbinaries/macos/${PACKAGE}-*.dmg;
sudo /usr/sbin/installer -target / -pkg /Volumes/${PACKAGE}-*.pkg/${PACKAGE}-*.pkg;
sudo /usr/bin/hdiutil detach /Volumes/${PACKAGE}-*.pkg
done
brew update;

brew install tox;
fi
@@ -11,7 +11,7 @@ set -e;
if test -n "${FEDORA_VERSION}";
then
CONTAINER_NAME="fedora${FEDORA_VERSION}";
CONTAINER_OPTIONS="-e LANG=en_US.UTF-8";
CONTAINER_OPTIONS="-e LANG=C.utf8";

if test -n "${TOXENV}";
then
@@ -72,18 +72,11 @@ then
# Note that exec options need to be defined before the container name.
docker exec ${CONTAINER_OPTIONS} ${CONTAINER_NAME} sh -c "cd artifacts && ${TEST_COMMAND}";

elif test "${TRAVIS_OS_NAME}" = "osx";
elif test "${TARGET}" = "dockerfile";
then
PYTHONPATH=/Library/Python/2.7/site-packages/ /usr/bin/python ./run_tests.py;

python ./setup.py build

python ./setup.py sdist

python ./setup.py bdist
cd config/docker && docker build --build-arg PPA_TRACK="dev" -f Dockerfile .

if test -f tests/end-to-end.py;
then
PYTHONPATH=. python ./tests/end-to-end.py --debug -c config/end-to-end.ini;
fi
elif test "${TRAVIS_OS_NAME}" = "osx";
then
tox -e ${TOXENV};
fi

0 comments on commit 13de2ea

Please sign in to comment.
You can’t perform that action at this time.