Skip to content

Commit

Permalink
Merge pull request #64 from djw8605/add-test
Browse files Browse the repository at this point in the history
Add testing
  • Loading branch information
brianhlin committed Dec 17, 2015
2 parents 326b509 + 7ac598d commit da2b810
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Makefile
*.tar.gz
.*
src/.*
release_dir
rsl_tester
Expand Down
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
sudo: required
env:
#matrix:
- OS_TYPE=centos OS_VERSION=6

services:
- docker

before_install:
- sudo apt-get update
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null
- sudo service docker restart
- sleep 5
- sudo docker pull centos:centos${OS_VERSION}


script:
# Run tests in Container
- sudo docker run --rm=true -v `pwd`:/htcondor-ce:rw centos:centos${OS_VERSION} /bin/bash -c "bash /htcondor-ce/tests/test_inside_docker.sh ${OS_VERSION}"

notifications:
email: false
26 changes: 26 additions & 0 deletions tests/test_inside_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh -x

OS_VERSION=$1

ls -l /home

# First, install all the needed packages.
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-${OS_VERSION}.noarch.rpm
yum -y install yum-plugin-priorities
rpm -Uvh https://repo.grid.iu.edu/osg/3.3/osg-3.3-el${OS_VERSION}-release-latest.rpm
yum -y install rpm-build gcc gcc-c++ boost-devel globus-rsl-devel condor-classads-devel cmake git tar gzip

# Prepare the RPM environment
mkdir -p /tmp/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cat >> /etc/rpm/macros.dist << 'EOF'
%dist .osg.el6
%osg 1
EOF

cp htcondor-ce/config/htcondor-ce.spec /tmp/rpmbuild/SPECS
package_version=`grep Version htcondor-ce/config/htcondor-ce.spec | awk '{print $2}'`
pushd htcondor-ce
git archive --format=tar --prefix=htcondor-ce-${package_version}/ HEAD | gzip >/tmp/rpmbuild/SOURCES/htcondor-ce-${package_version}.tar.gz
popd

rpmbuild --define '_topdir /tmp/rpmbuild' -ba /tmp/rpmbuild/SPECS/htcondor-ce.spec

0 comments on commit da2b810

Please sign in to comment.