Commit 5d3a3ee01cb70dcbbb1206073db1ec6cab5e591b
1 parent
66bfd79522
Fix no virtualenv on travis.
Showing 2 changed files with 3 additions and 2 deletions Inline Diff
.travis.yml
1 | # Using python for running the tests, using the `cram` test framework. | 1 | # Using python for running the tests, using the `cram` test framework. |
2 | language: python | 2 | language: python |
3 | 3 | ||
4 | # Python version to run tests with. | 4 | # Python version to run tests with. |
5 | python: | 5 | python: |
6 | - "2.7" | 6 | - "2.7" |
7 | 7 | ||
8 | env: | 8 | env: |
9 | # Default zsh | 9 | # Default zsh |
10 | - PPA="none" | 10 | - PPA="none" |
11 | # zsh 5 PPA | 11 | # zsh 5 PPA |
12 | - PPA="ppa:brainpower/testing" | 12 | - PPA="ppa:brainpower/testing" |
13 | 13 | ||
14 | before_script: | 14 | before_script: |
15 | 15 | ||
16 | # Show the git version being used to test. | 16 | # Show the git version being used to test. |
17 | - "git --version" | 17 | - "git --version" |
18 | 18 | ||
19 | # Show the zsh version being used to test. | 19 | # Show the zsh version being used to test. |
20 | - "zsh --version" | 20 | - "zsh --version" |
21 | 21 | ||
22 | # Test config for git. | 22 | # Test config for git. |
23 | - "git config --global user.name test" | 23 | - "git config --global user.name test" |
24 | - "git config --global user.email test@test.test" | 24 | - "git config --global user.email test@test.test" |
25 | 25 | ||
26 | install: | 26 | install: |
27 | # Add PPA if needed | 27 | # Add PPA if needed |
28 | - "./travis-ppa.sh" | 28 | - "./travis-ppa.sh" |
29 | # Install python requirements. | 29 | # Install python requirements. |
30 | - "pip install -r requirements.txt --use-mirrors" | 30 | - "pip install -r requirements.txt --use-mirrors" |
31 | # Install zsh. | 31 | # Install zsh. |
32 | - "sudo apt-get install zsh" | 32 | - "sudo apt-get install zsh" |
33 | 33 | ||
34 | # Run the tests. | 34 | # Run the tests. |
35 | script: "make tests" | 35 | script: "make tests PYENV=" |
36 | 36 |
Makefile
1 | .PHONY: itests tests | 1 | .PHONY: itests tests |
2 | 2 | ||
3 | PYENV ?= . .pyenv/bin/activate && | ||
3 | TESTS ?= tests | 4 | TESTS ?= tests |
4 | 5 | ||
5 | itests: | 6 | itests: |
6 | ${MAKE} tests CRAM_OPTS=-i | 7 | ${MAKE} tests CRAM_OPTS=-i |
7 | 8 | ||
8 | tests: | 9 | tests: |
9 | . .pyenv/bin/activate && ZDOTDIR="${PWD}/tests" cram ${CRAM_OPTS} --shell=zsh ${TESTS} | 10 | ${PYENV} ZDOTDIR="${PWD}/tests" cram ${CRAM_OPTS} --shell=zsh ${TESTS} |
10 | 11 |