Skip to content

Run testsuite on OSX and python 3.6#442

Merged
rahulporuri merged 10 commits into
masterfrom
ci/travis-osx
May 28, 2019
Merged

Run testsuite on OSX and python 3.6#442
rahulporuri merged 10 commits into
masterfrom
ci/travis-osx

Conversation

@rahulporuri
Copy link
Copy Markdown
Contributor

  • add install-edm-osx.sh shell script
  • rename existing install-edm.sh script as install-edm-linux.sh
  • run testsuite on osx in the existing combinations of runtime and toolkit
  • run testsuite on python 3.6 on linux and osx.

Note : The install-edm-osx.sh shell script and the changes to the travis config file are based on the CI setup in traitsui.

Poruri Sai Rahul added 2 commits May 20, 2019 10:51
and test on python 3.6 on linux/osx

	modified:   .travis.yml
	renamed:    ci/install-edm.sh -> ci/install-edm-linux.sh
	new file:   ci/install-edm-osx.sh
not sure why it fails on the osx jobs at the moment.

	modified:   .travis.yml
@rahulporuri
Copy link
Copy Markdown
Contributor Author

rahulporuri commented May 20, 2019

the osx jobs are failing during the enable installation step, specifically with error

Details
[EXECUTING] edm run -e chaco-test-2.7-pyqt -- pip install git+https://git@github.com/enthought/enable.git
Collecting git+https://git@github.com/enthought/enable.git
  Cloning https://git@github.com/enthought/enable.git to /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/pip-req-build-TVsCg9
    Complete output from command python setup.py egg_info:
    /Users/travis/.edm/envs/chaco-test-2.7-pyqt/lib/python2.7/site-packages/numpy/distutils/system_info.py:717: UserWarning: Specified path /usr/local/include/python2.7 is invalid.
      return self.get_paths(self.section, key)
    non-existing path in 'kiva/quartz': '/System/Library/Frameworks/Foundation.framework/Versions/A/Headers'
    Could not locate executable wx-config
    File not found: None. Cannot determine wx info.
    abort: there is no Mercurial repository here (.hg not found)
    running egg_info
    running build_src
    build_src
    building library "freetype2_src" sources
    creating build
    creating build/src.macosx-10.6-x86_64-2.7
      adding 'kiva/agg/freetype2/src/autofit/autofit.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftbase.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftsystem.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftinit.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftglyph.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftmm.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftbdf.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftbbox.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftdebug.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftxf86.c' to sources.
      adding 'kiva/agg/freetype2/src/base/fttype1.c' to sources.
      adding 'kiva/agg/freetype2/src/bdf/bdf.c' to sources.
      adding 'kiva/agg/freetype2/src/cff/cff.c' to sources.
      adding 'kiva/agg/freetype2/src/cid/type1cid.c' to sources.
      adding 'kiva/agg/freetype2/src/lzw/ftlzw.c' to sources.
      adding 'kiva/agg/freetype2/src/pcf/pcf.c' to sources.
      adding 'kiva/agg/freetype2/src/pfr/pfr.c' to sources.
      adding 'kiva/agg/freetype2/src/psaux/psaux.c' to sources.
      adding 'kiva/agg/freetype2/src/pshinter/pshinter.c' to sources.
      adding 'kiva/agg/freetype2/src/psnames/psnames.c' to sources.
      adding 'kiva/agg/freetype2/src/raster/raster.c' to sources.
      adding 'kiva/agg/freetype2/src/sfnt/sfnt.c' to sources.
      adding 'kiva/agg/freetype2/src/smooth/smooth.c' to sources.
      adding 'kiva/agg/freetype2/src/truetype/truetype.c' to sources.
      adding 'kiva/agg/freetype2/src/type1/type1.c' to sources.
      adding 'kiva/agg/freetype2/src/type42/type42.c' to sources.
      adding 'kiva/agg/freetype2/src/winfonts/winfnt.c' to sources.
      adding 'kiva/agg/freetype2/src/gzip/ftgzip.c' to sources.
      adding 'kiva/agg/freetype2/src/base/ftmac.c' to sources.
    building library "agg24_src" sources
    building library "kiva_src" sources
    building extension "kiva.agg._agg" sources
    creating build/src.macosx-10.6-x86_64-2.7/kiva
    creating build/src.macosx-10.6-x86_64-2.7/kiva/agg
    swig++: kiva/agg/agg.i
    swig -python -c++ -I/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Headers -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -Ikiva/agg/src -Ikiva/agg/agg-24/include -Ikiva/agg/agg-24/font_freetype -Ikiva/agg/freetype2/src/autofit -Ikiva/agg/freetype2/src/base -Ikiva/agg/freetype2/src/bdf -Ikiva/agg/freetype2/src/cache -Ikiva/agg/freetype2/src/cff -Ikiva/agg/freetype2/src/cid -Ikiva/agg/freetype2/src/gxvalid -Ikiva/agg/freetype2/src/gzip -Ikiva/agg/freetype2/src/lzw -Ikiva/agg/freetype2/src/otvalid -Ikiva/agg/freetype2/src/pcf -Ikiva/agg/freetype2/src/pfr -Ikiva/agg/freetype2/src/psaux -Ikiva/agg/freetype2/src/pshinter -Ikiva/agg/freetype2/src/psnames -Ikiva/agg/freetype2/src/raster -Ikiva/agg/freetype2/src/sfnt -Ikiva/agg/freetype2/src/smooth -Ikiva/agg/freetype2/src/tools -Ikiva/agg/freetype2/src/truetype -Ikiva/agg/freetype2/src/type1 -Ikiva/agg/freetype2/src/type42 -Ikiva/agg/freetype2/src/winfonts -Ikiva/agg/freetype2/include -Ikiva/agg/freetype2/src -I/Users/travis/.edm/envs/chaco-test-2.7-pyqt/lib/python2.7/site-packages/numpy/core/include -o build/src.macosx-10.6-x86_64-2.7/kiva/agg/agg_wrap.cpp -outdir build/src.macosx-10.6-x86_64-2.7/kiva/agg kiva/agg/agg.i
    unable to execute 'swig': No such file or directory
    error: command 'swig' failed with exit status 1

Poruri Sai Rahul added 2 commits May 20, 2019 11:35
- install swig in the devenv, which is needed to build enable from
source
- install enable dependencies explicitly, instead of implicitly
installing them via pip during the source install step
- add python 3.6 as a supported runtime
- use pip to install chaco, without installing dependencies, instead of
using python setup.py install

	modified:   ci/edmtool.py
For now, we remove explicitly installing the dependencies of enable
and install them implicitly when installing enable from source

	modified:   ci/edmtool.py
@rahulporuri
Copy link
Copy Markdown
Contributor Author

rahulporuri commented May 20, 2019

reg https://travis-ci.org/enthought/chaco/jobs/534666002 , there are 38 errors when the testsuite is run on python 2.7 + osx + wx toolkit. all of the errors are of the type.

======================================================================
ERROR: test_scatter_1d_rotated (chaco.tests.text_plot_1d_test_case.TextPlot1DTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/travis/.edm/envs/chaco-test-2.7-wx/lib/python2.7/site-packages/chaco/tests/text_plot_1d_test_case.py", line 85, in test_scatter_1d_rotated
    actual = gc.bmp_array[:, :, :]
AttributeError: 'PlotGraphicsContext' object has no attribute 'bmp_array'
----------------------------------------------------------------------

Copy link
Copy Markdown
Member

@itziakos itziakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some recommendation but I think that we should also use a later version of edm (currently the ci is using 1.5.2)

Comment thread .travis.yml Outdated
Poruri Sai Rahul added 2 commits May 20, 2019 16:43
	modified:   .travis.yml
based on PR review

	modified:   .travis.yml
Comment thread .travis.yml Outdated
and run edm command after paths are manipulated

	modified:   .travis.yml
Comment thread .travis.yml Outdated
	modified:   .travis.yml
@rahulporuri rahulporuri requested a review from itziakos May 22, 2019 16:20
@corranwebster
Copy link
Copy Markdown
Contributor

corranwebster commented May 27, 2019

reg https://travis-ci.org/enthought/chaco/jobs/534666002 , there are 38 errors when the testsuite is run on python 2.7 + osx + wx toolkit. all of the errors are of the type.

======================================================================
ERROR: test_scatter_1d_rotated (chaco.tests.text_plot_1d_test_case.TextPlot1DTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/travis/.edm/envs/chaco-test-2.7-wx/lib/python2.7/site-packages/chaco/tests/text_plot_1d_test_case.py", line 85, in test_scatter_1d_rotated
    actual = gc.bmp_array[:, :, :]
AttributeError: 'PlotGraphicsContext' object has no attribute 'bmp_array'
----------------------------------------------------------------------

This is probably because it is using the Quartz or OpenGL backend (I cant remember which is the default). It will probably pass with the image backend.

If we want to do our testing here comprehensively we should have another argument for the etstoolkit commands that sets the Kiva backend. And similarly for the Enable tests.

ETA: in the interim, set ETS_TOOLKIT to wx.image for Wx on OS X.

the env var has been updated to wx.image instead of wx
we also remove the allowed failure on the problematic osx job

	modified:   .travis.yml
	modified:   ci/edmtool.py
@corranwebster
Copy link
Copy Markdown
Contributor

This is creating a lot of test runs with the test matrix, which will be time-consuming when running (particularly) the OS X runs. You might consider running multiple toolkits per job like we do in the Pyface tests: https://github.com/enthought/pyface/blob/master/.travis.yml

Instead of creating a separate job for each runtime, toolkit
combination, create jobs for each runtime and run tests for all toolkits
of interest in the same job.

This is similar to how the CI is run in traitsui

	modified:   .travis.yml
@rahulporuri
Copy link
Copy Markdown
Contributor Author

This is creating a lot of test runs with the test matrix, which will be time-consuming when running (particularly) the OS X runs. You might consider running multiple toolkits per job like we do in the Pyface tests: https://github.com/enthought/pyface/blob/master/.travis.yml

Done. See commit above.

Copy link
Copy Markdown
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rahulporuri rahulporuri merged commit dffbe65 into master May 28, 2019
@rahulporuri rahulporuri deleted the ci/travis-osx branch May 28, 2019 09:02
@rahulporuri
Copy link
Copy Markdown
Contributor Author

thanks @itziakos and @corranwebster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants