Skip to content

Commit

Permalink
Showing 10 changed files with 206 additions and 170 deletions.
19 changes: 6 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -14,18 +14,12 @@ matrix:
- python: "2.7"
env: USE_QT_API=PyQt4 USE_CONDA=true
os: linux
- python: "3.3"
env: USE_QT_API=PyQt4 USE_CONDA=true
os: linux
- python: "3.4"
env: USE_QT_API=PyQt4 USE_CONDA=true
os: linux
#- python: "2.7"
# env: USE_QT_API=PyQt5 USE_CONDA=true
# os: linux
#- python: "3.3"
# env: USE_QT_API=PyQt5 USE_CONDA=true
# os: linux
#- python: "3.4"
# env: USE_QT_API=PyQt5 USE_CONDA=true
# os: linux
@@ -39,9 +33,6 @@ matrix:
#- python: "2.7"
# env: USE_QT_API=PySide USE_CONDA=false
# os: linux
#- python: "3.3"
# env: USE_QT_API=PySide USE_CONDA=false
# os: linux
#- python: "3.4"
# env: USE_QT_API=PySide USE_CONDA=false
# os: linux
@@ -56,8 +47,10 @@ install:
- export PATH="$HOME/miniconda/bin:$PATH";
- source activate test-environment;
- QT_API=$USE_QT_API;
- export SPYDER_TEST_TRAVIS=True;
- export SPYDER_TEST_TRAVIS_TIMER=30000;

script:
- python bootstrap.py --test-travis 30
- python setup.py install
- ./continuous_integration/travis_script.sh
script:
- ./continuous_integration/build_test.sh
- ./continuous_integration/run_test.sh
- ./continuous_integration/modules_test.sh
11 changes: 0 additions & 11 deletions bootstrap.py
Original file line number Diff line number Diff line change
@@ -42,9 +42,6 @@
default=False, help="Disable Apport exception hook (Ubuntu)")
parser.add_option('--debug', action='store_true',
default=False, help="Run Spyder in debug mode")
parser.add_option('--test-travis', dest="shutdown_time", default=None,
help="Closes the application after the entered number of "
"seconds. Useful in continuous integration testing.")

options, args = parser.parse_args()

@@ -166,12 +163,4 @@
# gmtime() converts float into tuple, but loses milliseconds
("%.4f" % time_lapse).split('.')[1])

# Set variable to start timer inside spyder application
if options.shutdown_time is not None:
timer_seconds = int(options.shutdown_time)
os.environ['SPYDER_TEST_TRAVIS'] = 'True'
# In miliseconds
os.environ['SPYDER_TEST_TRAVIS_TIMER'] = str(timer_seconds*1000)
print("\nSpyder will automatically shut down in {} seconds.\n".format(timer_seconds))

start_app.main()
9 changes: 9 additions & 0 deletions continuous_integration/build_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -ex

if [ "$USE_CONDA" = true ] ; then
# Building the recipe
cd continuous_integration
conda build conda.recipe
fi
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ build:
osx_is_app: True

source:
git_url: ../
git_url: {{ [environ.get('HOME'), '/pr-clone']|join }}
git_tag: {{ ['travis_pr_', environ.get('TRAVIS_PULL_REQUEST')]|join }}

requirements:
build:
@@ -25,6 +26,8 @@ requirements:
- sphinx
- pep8
- psutil
- pylint
- six
- python.app [osx]

test:
51 changes: 51 additions & 0 deletions continuous_integration/modules_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

set -ex

for f in spyderlib/*.py; do
if [[ $f == "spyderlib/restart_app.py" ]]; then
continue
fi
if [[ $f == "spyderlib/spyder.py" ]]; then
continue
fi
if [[ $f == "spyderlib/tour.py" ]]; then
continue
fi
if [[ $f == "spyderlib/start_app.py" ]]; then
continue
fi
if [[ $f == "spyderlib/pil_patch.py" ]]; then
continue
fi
python "$f"
if [ $? -ne 0 ]; then
exit 1
fi
done


for f in spyderlib/*/*.py; do
if [[ $f == spyderlib/plugins/*.py ]]; then
continue
fi
if [[ $f == spyderlib/qt/*.py ]]; then
continue
fi
if [[ $f == spyderlib/utils/environ.py ]]; then
continue
fi
if [[ $f == spyderlib/utils/qthelpers.py ]]; then
continue
fi
if [[ $f == spyderlib/utils/windows.py ]]; then
continue
fi
if [[ $f == spyderlib/widgets/*.py ]]; then
continue
fi
python "$f"
if [ $? -ne 0 ]; then
exit 1
fi
done
17 changes: 17 additions & 0 deletions continuous_integration/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -ex

if [ "$USE_CONDA" = true ] ; then
# Move to a tmp dir
mkdir ~/tmp
cd ~/tmp

# Install and run the package
conda install ~/miniconda/conda-bld/linux-64/spyder-*.tar.bz2

spyder
if [ $? -ne 0 ]; then
exit 1
fi
fi
Loading

0 comments on commit a712a1c

Please sign in to comment.