pfalcon / ScratchABlock

Yet another crippled decompiler project
https://github.com/EiNSTeiN-/decompiler/issues/9#issuecomment-103221200
GNU General Public License v3.0
104 stars 23 forks source link

Add support for Travis CI. #14

Closed maximumspatium closed 6 years ago

maximumspatium commented 6 years ago

Well, time to setup TravisCI...

Here we go. You'd need to hook up Travis CI to the ScratchABlock Github repository in order to run automated tests.

maximumspatium commented 6 years ago

This will break running the testsuite on a normal system, where "python" and "nosetests" refer to python2, while python3 should be "python3" and "nosetests3".

Hmm, this didn't work for me on a "normal system" either (Ubuntu). I kept getting nosetests3: command not found until I installed python3-nose.

For Travis, it's recommended to use pip packages, not system-wide packages.

What's about testing for both nosetests and nosetests3?

pfalcon commented 6 years ago

Hmm, this didn't work for me on a "normal system" either (Ubuntu). I kept getting nosetests3: command not found until I installed python3-nose.

Yes, that's how it's expected to work, on Debian/Ubuntu. That may be not portable to other distros, but given python2/python3 split, there's hardly a better way to ensure that unsuspecting users don't run python2's version and don't get weird errors.

pfalcon commented 6 years ago

For Travis, it's recommended to use pip packages, not system-wide packages.

And distros recommend to use their packages, and most users follow. This creates a discrepancy between Travis abstract land and real-world user systems, leading to conflicts like in the latest iteration:

ImportError: No module named 'yaml'

pfalcon commented 6 years ago

So yep, we either need to switch fully to distro packages, and find a way to use non-distro packages which is compatible with distro packages. 1st, like you do, is apparently easier.

maximumspatium commented 6 years ago

I've just switched the Travis integration to distributions packages at the cost of highly increased testing time due to additional download and installation. Moreover, Travis testing distro still stuck with the older nosetests 1.3.1. Anyway, it works now.

pfalcon commented 6 years ago

Thanks for taking care of that! Will merge on a free minute. (After appending ".travis.yml: " to the commit message - I really love those location prefixes ;-) ).

maximumspatium commented 6 years ago

After appending ".travis.yml: " to the commit message - I really love those location prefixes ;-)

Yes, that's a royal pain in the ass.

pfalcon commented 6 years ago

Thanks, cleaned up and merged.