Browse Source

clean up for travis CI

Matthew Wang 12 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
     - "2.5"
4
     - "2.5"
5
     - "2.6"
5
     - "2.6"
6
     - "2.7"
6
     - "2.7"
7
-    - "pypy"
8
     - "3.2"
7
     - "3.2"
9
     - "3.3"
8
     - "3.3"
9
+    - "pypy"
10
 
10
 
11
 install:
11
 install:
12
     - python setup.py install
12
     - python setup.py install
13
 
13
 
14
 script:
14
 script:
15
-    - ./tests/tests.sh
15
+    - make test

+ 1
- 0
MANIFEST.in View File

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

+ 2
- 3
Makefile View File

2
 
2
 
3
 TESTPYPI = http://testpypi.python.org/pypi
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
 dogfood:
7
 dogfood:
8
 	./cdiff.py -s
8
 	./cdiff.py -s
10
 	git diff | ./cdiff.py -s
10
 	git diff | ./cdiff.py -s
11
 
11
 
12
 test:
12
 test:
13
-	PYTHON=python ./tests/tests.sh
14
-	PYTHON=python3 ./tests/tests.sh
13
+	tests/regression.sh
15
 
14
 
16
 clean:
15
 clean:
17
 	rm -f cdiff MANIFEST
16
 	rm -f cdiff MANIFEST

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

5
 SELF_DIR=$(cd $(dirname $0) && pwd) || exit 1
5
 SELF_DIR=$(cd $(dirname $0) && pwd) || exit 1
6
 CDIFF=$SELF_DIR/../cdiff.py
6
 CDIFF=$SELF_DIR/../cdiff.py
7
 
7
 
8
-# Override this to test with python3
9
-PYTHON=${PYTHON:-python}
10
-
11
 function pass()
8
 function pass()
12
 {
9
 {
13
     if [[ -t 1 ]]; then
10
     if [[ -t 1 ]]; then
33
     local cdiff_opt=${3:-""}
30
     local cdiff_opt=${3:-""}
34
 
31
 
35
     echo -n "Test option '$cdiff_opt' with input '$input' ... "
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
         pass
34
         pass
39
         return 0
35
         return 0
40
     else
36
     else