Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous Integration #2

Open
2 of 4 tasks
jakirkham opened this issue Aug 5, 2015 · 6 comments
Open
2 of 4 tasks

Continuous Integration #2

jakirkham opened this issue Aug 5, 2015 · 6 comments

Comments

@jakirkham
Copy link
Member

  • Need automated test suite for the Raspberry Pi.
    • Assume there is a camera, but mock out interaction.
  • Provide mocked tests for camera and allow PiCamera tests to skip.
  • Setup continuous integration.
@bnhwa
Copy link
Collaborator

bnhwa commented Aug 5, 2015

are there any programs in particular that you would recommend to to test my program?

@jakirkham
Copy link
Member Author

Probably, would use nose.

@jakirkham
Copy link
Member Author

I think the first task on the list is basically doable if we assume there is a camera to work with. It would just run help for each program and the run each program explicitly.

  • Preview for 1 second.
  • Capture a picture and make sure it saved.
  • Interaction based one would require mocking* for the interaction** ***.

The next two tasks should be tabled for now as they require more work (namely mocking).

* - This is how one might mock it out ( http://stackoverflow.com/questions/28762993/how-to-unittest-gpio-output-value-of-raspberry-pi-in-python ).
** - Turns out you set the output value on a port ( http://sourceforge.net/p/raspberry-gpio-python/wiki/Outputs ).
*** - More examples ( http://raspi.tv/2013/rpi-gpio-basics-4-setting-up-rpi-gpio-numbering-systems-and-inputs ) ( http://raspi.tv/2013/rpi-gpio-basics-5-setting-up-and-using-outputs-with-rpi-gpio ).

@jakirkham
Copy link
Member Author

Worth looking at how tests are done with picamera ( https://github.com/waveform80/picamera/tree/master/tests ) and RPi.GPIO ( http://sourceforge.net/p/raspberry-gpio-python/code/ci/default/tree/test ).

@jakirkham
Copy link
Member Author

As for a VM, it would be best to use QEMU. A kernel exists for the Raspberry Pi using QEMU ( https://github.com/dhruvvyas90/qemu-rpi-kernel ). However, it would be good if we were able to reproduce it from source. Here's a way of getting started ( http://paulscott.co.za/blog/full-raspberry-pi-raspbian-emulation-with-qemu ). Here's some thoughts on getting this into Travis CI ( http://www.tomaz.me/2013/12/02/running-travis-ci-tests-on-arm.html ).

@bnhwa bnhwa mentioned this issue Aug 10, 2015
11 tasks
@jakirkham
Copy link
Member Author

Now have automated test suite that runs on the Raspberry Pi. Will table the rest of these tasks for later.

@jakirkham jakirkham changed the title Need test suite Continuous Integration Aug 12, 2015
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

No branches or pull requests

2 participants