Browse Source

clean up for travis CI

Matthew Wang 11 years ago
parent
commit
809006d450
4 changed files with 6 additions and 10 deletions
  1. 2
    2
      .travis.yml
  2. 1
    0
      MANIFEST.in
  3. 2
    3
      Makefile
  4. 1
    5
      tests/regression.sh

+ 2
- 2
.travis.yml View File

@@ -4,12 +4,12 @@ python:
4 4
     - "2.5"
5 5
     - "2.6"
6 6
     - "2.7"
7
-    - "pypy"
8 7
     - "3.2"
9 8
     - "3.3"
9
+    - "pypy"
10 10
 
11 11
 install:
12 12
     - python setup.py install
13 13
 
14 14
 script:
15
-    - ./tests/tests.sh
15
+    - make test

+ 1
- 0
MANIFEST.in View File

@@ -3,4 +3,5 @@ include LICENSE
3 3
 include Makefile
4 4
 include README.rst
5 5
 include tests/*
6
+include tests/*/*
6 7
 exclude cdiff

+ 2
- 3
Makefile View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 TESTPYPI = http://testpypi.python.org/pypi
4 4
 
5
-.PHONY: dogfood test clean dist-test dist
5
+.PHONY: dogfood test clean build dist-test dist
6 6
 
7 7
 dogfood:
8 8
 	./cdiff.py -s
@@ -10,8 +10,7 @@ dogfood:
10 10
 	git diff | ./cdiff.py -s
11 11
 
12 12
 test:
13
-	PYTHON=python ./tests/tests.sh
14
-	PYTHON=python3 ./tests/tests.sh
13
+	tests/regression.sh
15 14
 
16 15
 clean:
17 16
 	rm -f cdiff MANIFEST

tests/tests.sh → tests/regression.sh View File

@@ -5,9 +5,6 @@ set -o errexit
5 5
 SELF_DIR=$(cd $(dirname $0) && pwd) || exit 1
6 6
 CDIFF=$SELF_DIR/../cdiff.py
7 7
 
8
-# Override this to test with python3
9
-PYTHON=${PYTHON:-python}
10
-
11 8
 function pass()
12 9
 {
13 10
     if [[ -t 1 ]]; then
@@ -33,8 +30,7 @@ function cmpOutput()
33 30
     local cdiff_opt=${3:-""}
34 31
 
35 32
     echo -n "Test option '$cdiff_opt' with input '$input' ... "
36
-    if $PYTHON $CDIFF $cdiff_opt $input | diff -ub $expected_out - >& /dev/null
37
-    then
33
+    if $CDIFF $cdiff_opt $input | diff -ubq $expected_out - >& /dev/null; then
38 34
         pass
39 35
         return 0
40 36
     else