Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Commit

Permalink
run tests inside CCCP
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
  • Loading branch information
TomasTomecek committed Nov 29, 2017
1 parent 1eaa295 commit 23dfb41
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ enumerate-tools:
docker run -it -v ${PWD}:/src -e TOOLS_PACKAGES=$(shell $(DG_EXEC) --template="{{spec.packages|join(\",\")}}") --rm $(REPOSITORY) /src/enumerate-tools.py

test:
docker run --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}/tests/:/tests -e IMAGE_NAME=$(REPOSITORY) modularitycontainers/conu
docker run --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}/tests/:/tests -e IMAGE_NAME=$(REPOSITORY) docker.io/modularitycontainers/conu

clean:
rm Dockerfile || :
Expand Down
2 changes: 1 addition & 1 deletion cccp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test-skip : True

# This is path of the script that initiates the user defined tests. It must be able to
# return an exit code.
test-script : null
test-script : ./requirements.sh && pytest -vv ./tests/

# This is the path of custom build script.
build-script : null
Expand Down
21 changes: 21 additions & 0 deletions requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -e

if grep "CentOS Linux 7" /etc/os-release >/dev/null; then
cat >/etc/yum.repos.d/virt.repo <<EOF
[virt7-container-common-candidate]
name=virt7-container-common-candidate
baseurl=https://cbs.centos.org/repos/virt7-container-common-candidate/x86_64/os/
enabled=1
gpgcheck=0
EOF
# yum remove -y python-chardet # pip loves overlayfs
yum install -y epel-release
yum install -y acl nmap-ncat python2-pip python-six pyxattr python2-docker git
pip install pytest
pip install git+https://github.com/fedora-modularity/conu
else
echo "Unsupported distro"
exit 1
fi

0 comments on commit 23dfb41

Please sign in to comment.