Skip to content

Commit f448818

Browse files
author
efajardo
committed
Updating Travis conflicts
2 parents cf00a82 + b3524d4 commit f448818

7 files changed

Lines changed: 627 additions & 119 deletions

File tree

.gitignore

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
.hypothesis/
50+
.pytest_cache/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
db.sqlite3
60+
61+
# Flask stuff:
62+
instance/
63+
.webassets-cache
64+
65+
# Scrapy stuff:
66+
.scrapy
67+
68+
# Sphinx documentation
69+
docs/_build/
70+
71+
# PyBuilder
72+
target/
73+
74+
# Jupyter Notebook
75+
.ipynb_checkpoints
76+
77+
# IPython
78+
profile_default/
79+
ipython_config.py
80+
81+
# pyenv
82+
.python-version
83+
84+
# celery beat schedule file
85+
celerybeat-schedule
86+
87+
# SageMath parsed files
88+
*.sage.py
89+
90+
# Environments
91+
.env
92+
.venv
93+
env/
94+
venv/
95+
ENV/
96+
env.bak/
97+
venv.bak/
98+
99+
# Spyder project settings
100+
.spyderproject
101+
.spyproject
102+
103+
# Rope project settings
104+
.ropeproject
105+
106+
# mkdocs documentation
107+
/site
108+
109+
# mypy
110+
.mypy_cache/
111+
.dmypy.json
112+
dmypy.json
113+
114+
# Pyre type checker
115+
.pyre/

.travis.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
sudo: required
22
env:
33
matrix:
4-
- BUILD_TYPE=docs OS_VERSION=7
54
- OS_TYPE=centos OS_VERSION=6
65
- OS_TYPE=centos OS_VERSION=7
76
- OS_TYPE=centos OS_VERSION=6 XRD_CACHE="root://xrd-cache-1.t2.ucsd.edu"
@@ -22,7 +21,7 @@ env:
2221
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="root://osg-kansas-city-stashcache.nrp.internet2.edu"
2322
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="osg-chicago-stashcache.nrp.internet2.edu"
2423
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="fiona.uvalight.net"
25-
- OS_TYPE=centos OS_VERSION=7 XRD_CACHE="root://sc-cache.chtc.wisc.edu"
24+
- BUILD_TYPE=http OS_TYPE=centos OS_VERSION=7
2625

2726

2827
language: python
@@ -33,17 +32,26 @@ before_script:
3332
- pip install markdown-include
3433

3534
services:
36-
- docker
35+
- docker
3736

3837
before_install:
39-
- sudo apt-get update
40-
- 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
41-
- sudo service docker restart
42-
- sleep 5
43-
- sudo docker pull centos:centos${OS_VERSION}
38+
- sudo apt-get update
39+
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"'
40+
| sudo tee /etc/default/docker > /dev/null
41+
- sudo service docker restart
42+
- sleep 5
43+
- sudo docker pull centos:centos${OS_VERSION}
4444

4545

4646
script:
47-
# Run tests in Container
48-
- if [ "$BUILD_TYPE" = "docs" ]; then bin/stashcp2/tests/build_docs.sh; fi
49-
- bin/stashcp2/tests/setup_tests.sh ${OS_VERSION}
47+
- if [ "$BUILD_TYPE" = "docs" ]; then bin/stashcp2/tests/build_docs.sh; fi
48+
- bin/stashcp2/tests/setup_tests.sh ${OS_VERSION}
49+
50+
deploy:
51+
provider: pypi
52+
user: "djw8605"
53+
skip_existing: true
54+
password:
55+
secure: fRcpI2s8eM5VcHt7q3ROxiB69ATg8XewRBXSY2LvdxysVKc9rp38KJOAI2JtS+JYdmoY/BUeLUHmxwEmSywjtK2x7qYP7EImscyu0deIsNFx9z+2eyfkPlPEA7StE5isorpIzGTqINvptqk1zGycQM9OUhJqOjFfdLH3/dlQFFhbRnoqPZx/j+QHdVgLgVn72RHEc6leW6zHPGyrLJH8wmPpvzEHFRf0pdFb73vcONzboB1yFwmh6GrDa6+B/uHS3H9N7J6P3QMQjn6yV6Q3f5D/mV+v9AdAqHvKY0QLCIo6bDooq7eGq0dPgbooktIzN4tvsbOkG7eqCtPLxiVyBdFPPQb9PTRHinf/+zs3LylpYKElmu9whkvDaKz2GxKStctFsRr7ofC0vVIp5pjArPVKT4etLOwmzmMchTP/qUIhvFG3MwQOR7x80GpTTgkrv21z1/h3bFyk8zRaikQuZ6X3uIm3+FrG8fp6HVnR9jROYE9BV4UF2Mf+QZ2I7NqC9T0ASw9HslM4G/E0M97JODmNIAppquDAZRR+jPUUqwWHL3W65SAncoc2teNz8TLZLFvnPA01PK/ltpvssEL2lWIZrCshNyX1OJA24mMgs1aqB22PNPc7cvvGQGDvLaYweUZDMnyJiCevHicPOcqj9pWXAzHib+3GzPZ8dWa1d2g=
56+
on:
57+
tags: true

bin/stashcp2/tests/setup_tests.sh

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,43 @@
66
el_version=$1
77
cache=$2
88

9+
if [ "${BUILD_TYPE}" = "http" ]; then
10+
# Run the test without a container
11+
# Copy in the .job.ad file:
12+
cp bin/stashcp2/tests/job.ad ./.job.ad
13+
python setup.py install
14+
15+
# Test against a file that is known to not exist
16+
set +e
17+
stashcp --cache=$XRD_CACHE /blah/does/not/exist ./
18+
if [ $? -eq 0 ]; then
19+
echo "Failed to exit with non-zero exit status when it should have"
20+
exit 1
21+
fi
22+
set -e
23+
24+
# Try copying with different destintion filename
25+
stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 query.test
26+
27+
result=`md5sum query.test | awk '{print $1;}'`
28+
29+
if [ "$result" != "12bdb9a96cd5e8ca469b727a81593201" ]; then
30+
exit 1
31+
fi
32+
33+
rm -f query.test
34+
35+
# Perform tests
36+
stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 ./
37+
38+
result=`md5sum query1 | awk '{print $1;}'`
39+
40+
if [ "$result" != "12bdb9a96cd5e8ca469b727a81593201" ]; then
41+
exit 1
42+
fi
43+
944
# Run tests in Container
10-
if [ "$el_version" = "6" ]; then
45+
elif [ "$el_version" = "6" ]; then
1146

1247
sudo docker run --privileged --rm=true -v `pwd`:/StashCache:rw centos:centos${OS_VERSION} /bin/bash -c "bash -xe /StashCache/bin/stashcp2/tests/test_inside_docker.sh ${OS_VERSION} ${XRD_CACHE}"
1348

bin/stashcp2/tests/test_inside_docker.sh

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ cp /StashCache/bin/stashcp2/tests/job.ad ./.job.ad
4242

4343
# Test against a file that is known to not exist
4444
set +e
45-
/StashCache/bin/stashcp --cache=$XRD_CACHE /blah/does/not/exist ./
45+
/StashCache/stashcp.py --cache=$XRD_CACHE /blah/does/not/exist ./
4646
if [ $? -eq 0 ]; then
4747
echo "Failed to exit with non-zero exit status when it should have"
4848
exit 1
4949
fi
5050
set -e
5151

5252
# Try copying with no forward slash
53-
/StashCache/bin/stashcp --cache=$XRD_CACHE user/dweitzel/public/blast/queries/query1 ./
53+
/StashCache/stashcp.py --cache=$XRD_CACHE user/dweitzel/public/blast/queries/query1 ./
5454

5555
result=`md5sum query1 | awk '{print $1;}'`
5656

5757
rm query1
5858

5959
# Try copying with different destintion filename
60-
/StashCache/bin/stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 query.test
60+
/StashCache/stashcp.py --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 query.test
6161

6262
result=`md5sum query.test | awk '{print $1;}'`
6363

@@ -68,15 +68,48 @@ fi
6868
rm -f query.test
6969

7070
# Perform tests
71-
/StashCache/bin/stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 ./
71+
/StashCache/stashcp.py --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 ./
7272

7373
result=`md5sum query1 | awk '{print $1;}'`
7474

7575
if [ "$result" != "12bdb9a96cd5e8ca469b727a81593201" ]; then
7676
exit 1
7777
fi
78+
rm -f query.test
79+
80+
# Perform methods test
81+
/StashCache/stashcp.py --cache=$XRD_CACHE --method=cvmfs,xrootd -d /user/dweitzel/public/blast/queries/query1 ./
82+
83+
result=`md5sum query1 | awk '{print $1;}'`
84+
85+
if [ "$result" != "12bdb9a96cd5e8ca469b727a81593201" ]; then
86+
exit 1
87+
fi
88+
rm -f query.test
89+
90+
# Perform methods test
91+
/StashCache/stashcp.py --cache=$XRD_CACHE --method=xrootd -d /user/dweitzel/public/blast/queries/query1 ./
92+
93+
result=`md5sum query1 | awk '{print $1;}'`
94+
95+
if [ "$result" != "12bdb9a96cd5e8ca469b727a81593201" ]; then
96+
exit 1
97+
fi
98+
rm -f query.test
99+
100+
# Perform methods test
101+
/StashCache/stashcp.py --cache=$XRD_CACHE --method=http,xrootd -d /user/dweitzel/public/blast/queries/query1 ./
102+
103+
result=`md5sum query1 | awk '{print $1;}'`
104+
105+
if [ "$result" != "12bdb9a96cd5e8ca469b727a81593201" ]; then
106+
exit 1
107+
fi
108+
rm -f query.test
109+
110+
78111

79-
/StashCache/bin/stashcp --cache=$XRD_CACHE -d -r /user/dweitzel/public/blast/queries ./
112+
/StashCache/stashcp.py --cache=$XRD_CACHE -d -r /user/dweitzel/public/blast/queries ./
80113
ls -lah
81114

82115
rm -rf queries
File renamed without changes.

0 commit comments

Comments
 (0)