Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pulsar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NDIP
Pulsar
Commits
cfc8b526
Commit
cfc8b526
authored
9 years ago
by
John Chilton
Browse files
Options
Downloads
Patches
Plain Diff
Experiment: Use tox with travis testing.
parent
fabd0dbf
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.travis.yml
+12
-33
12 additions, 33 deletions
.travis.yml
.travis/setup_tests.sh
+22
-0
22 additions, 0 deletions
.travis/setup_tests.sh
setup.cfg
+2
-0
2 additions, 0 deletions
setup.cfg
tox.ini
+18
-4
18 additions, 4 deletions
tox.ini
with
54 additions
and
37 deletions
.travis.yml
+
12
−
33
View file @
cfc8b526
# TODO: test condor
# TODO: test ssh stuff (setup key)
language
:
python
python
:
-
2.6
-
2.7
python
:
2.7
env
:
-
REQUIREMENTS_SUFFIX=
-
TOX_ENV=py27-lint
-
TOX_ENV=py34-lint
-
TOX_ENV=py27-lint-readme
-
TOX_ENV=lint-docs
-
TOX_ENV=py26 SETUP=true
-
TOX_ENV=py27 SETUP=true
install
:
-
sudo apt-get install libxml2-dev libxslt1-dev libcurl3 python-pycurl openssh-server
-
pip install -r requirements$REQUIREMENTS_SUFFIX.txt --use-mirrors ||
true
-
pip install -r dev-requirements$REQUIREMENTS_SUFFIX.txt --use-mirrors ||
true
-
pip install coveralls --use-mirrors
# Required fro coveralls reporting.
-
sudo apt-get install slurm-llnl slurm-llnl-torque
# slurm-drmaa1 slurm-drmaa-dev
-
sudo apt-get install libslurm23
-
wget http://launchpadlibrarian.net/104075475/slurm-drmaa1_1.0.4-3_amd64.deb
-
sudo dpkg -i slurm-drmaa1_1.0.4-3_amd64.deb
-
wget http://launchpadlibrarian.net/104075474/slurm-drmaa-dev_1.0.4-3_amd64.deb
-
sudo dpkg -i slurm-drmaa-dev_1.0.4-3_amd64.deb
-
sudo /usr/sbin/create-munge-key
-
sudo service munge start
-
sudo python scripts/configure_test_slurm.py
-
echo "export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so" >> local_env.sh
-
echo ". $VIRTUAL_ENV/bin/activate" >> local_env.sh
-
pip install drmaa
-
sudo adduser --quiet --disabled-password --gecos TEST u1
## Create user for run-as-user test.
-
mkdir -p ~/.ssh && cp test_data/testkey.pub ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
# - sudo apt-get install condor
-
pip install tox
-
if [ "$SETUP" == "true" ]; then .travis/setup_tests.sh; fi
script
:
export PULSAR_TEST_KEY=test_data/testkey; export TEST_WEBAPP_POST_SHUTDOWN_SLEEP=1; . local_env.sh; tox -e $TOX_ENV
script
:
export PULSAR_TEST_KEY=test_data/testkey; export TEST_WEBAPP_POST_SHUTDOWN_SLEEP=1; . local_env.sh; make lint && make lint-docs && if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then
true
; else make lint-readme; fi && make tests
after_success
:
-
coveralls
## TODO: Figure out why Python 3.3 hangs.
#matrix:
# include:
# - python: 3.3
# env: REQUIREMENTS_SUFFIX=3
# allow_failures:
# - python: 3.3
This diff is collapsed.
Click to expand it.
.travis/setup_tests.sh
0 → 100755
+
22
−
0
View file @
cfc8b526
#!/bin/bash
set
-e
set
-v
sudo
apt-get
install
libxml2-dev libxslt1-dev libcurl3 python-pycurl openssh-server
#pip install -r requirements$REQUIREMENTS_SUFFIX.txt --use-mirrors || true
#pip install -r dev-requirements.txt --use-mirrors || true
pip
install
coveralls
--use-mirrors
# Required fro coveralls reporting.
sudo
apt-get
install
slurm-llnl slurm-llnl-torque
# slurm-drmaa1 slurm-drmaa-dev
sudo
apt-get
install
libslurm23
wget http://launchpadlibrarian.net/104075475/slurm-drmaa1_1.0.4-3_amd64.deb
sudo
dpkg
-i
slurm-drmaa1_1.0.4-3_amd64.deb
wget http://launchpadlibrarian.net/104075474/slurm-drmaa-dev_1.0.4-3_amd64.deb
sudo
dpkg
-i
slurm-drmaa-dev_1.0.4-3_amd64.deb
sudo
/usr/sbin/create-munge-key
sudo
service munge start
sudo
python scripts/configure_test_slurm.py
echo
"export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so"
>>
local_env.sh
echo
".
$VIRTUAL_ENV
/bin/activate"
>>
local_env.sh
sudo
adduser
--quiet
--disabled-password
--gecos
TEST u1
## Create user for run-as-user test.
mkdir
-p
~/.ssh
&&
cp
test_data/testkey.pub ~/.ssh/authorized_keys
&&
chmod
600 ~/.ssh/authorized_keys
This diff is collapsed.
Click to expand it.
setup.cfg
+
2
−
0
View file @
cfc8b526
...
...
@@ -7,3 +7,5 @@ logging-filter=pulsar,paste
logging-level=INFO
[flake8]
max-line-length
= 150
exclude
= test_tool_deps.py
max-complexity
= 9
This diff is collapsed.
Click to expand it.
tox.ini
+
18
−
4
View file @
cfc8b526
[tox]
envlist
=
lint, lint-readme, lint-docs, py26, py27, py34
envlist
=
py27-
lint,
py27-
lint-readme, lint-docs,
py34-lint,
py26, py27, py34
[testenv]
commands
=
{envpython} setup.py nosetests []
...
...
@@ -7,14 +7,28 @@ deps =
-rdev-requirements.txt
drmaa
[testenv:lint]
commands
=
m
ake
lin
t
[testenv:
py27-
lint]
commands
=
fl
ake
8 pulsar tes
t
skip_install
=
True
deps
=
flake8
[testenv:lint-readme]
[testenv:py34-lint]
commands
=
flake8 pulsar test
skip_install
=
True
deps
=
flake8
[testenv:py27-lint-readme]
commands
=
make lint-readme
skip_install
=
True
whitelist_externals
=
make
deps
=
readme
[testenv:lint-docs]
commands
=
make lint-docs
skip_install
=
True
whitelist_externals
=
make
deps
=
-rrequirements.txt
sphinx
=
=1.2
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment