I want to add a new command-line option*, so I forked and cloned the repo, made the relevant additions and changes on a new branch, and ran “make tests” with hopes of success–this is my first Python code–only to see:
replied earlier, unfortunately didn't cc the list, that a fresh
checkout for me runs 179 tests.
Here's some things to try: what version of nose are you running?
nosetests --version
Are you on a Linux distribution or something more exotic?
It seems like nosetests isn't finding the unittests. You could try things like:
# Point nose directly at a file containing tests
PYTHONPATH=./lib nosetests -v test/units/TestConstants.py
# Make sure we aren't missing the tests for some strange reason
cd test/units
ls -al
# Run nosetests directly from the testing subdirectory
PYTHONPATH=../../lib nosetests -v
I do all of my development on an NTFS-formatted USB drive, which means the executable bits can either for all files can either be set or not–chmod doesn’t work. (At least not on Debian 6.)
My USB drive includes some directories in my PATH, including $GOPATH/bin, so I have to accept all of the files being executable.
I started playing with Vagrant this week to see if it would be useful. It will, particularly with the Ansible provisioner and multi-machine setup, so I tried booting up a few machines and letting Vagrant create the inventory file. It writes out the first machine’s IP, launches Ansible, then Ansible fails with:
ERROR: problem running /mnt/4tb-usb/repos/ansible-playbooks/site/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory --list ([Errno 8] Exec format error)
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
A small patch to the Ansible provisioner in Vagrant enables support for the --force-read option, allowing Vagrant and Ansible both to work.
The Vagrant scenario excluded, I would rather keep my inventory files on my USB drive. With it being NTFS (so that it also works well with Windows) and requiring every file to retain the executable bit, using Ansible is made more difficult by not offering an option to force reading of the inventory file when the executable bit is set.
Travis doesn’t really suit the needs of the project much currently, however on another note, you may want to move past trying to run “make tests” and figure out what works for you.
I personally use the following (the -w might be important for you):
Thank you for the suggestion, Matt. I tried your test locally and it failed on my machine. I unfortunately don’t know Python well enough to figure out what will work for me.
If Travis isn’t a good fit for Anible, I’ll accept that. I just used it with Vagrant and loved the simple testing it offered, so thought it might be good here.
Yeah official conversation needs to happen here vs IRC.
All being said, I’ve replied on the ticket.
I think what needs to happen (see ticket) is that the vagrant plugin, if people are going to be using it on NTFS filesystems, etc, is that it needs to generate a static rather than dynamic inventory.
From your comment on the pull request, --force-read really means --interpret-as-static-even-if-chmod-plus-x, not --interpret-as-script-even-if-no-chmod-plus-x. Apologies if my use-case left that unclear.
Thank you for considering this request. I’m using the changes locally (both to Ansible and to the Vagrant plugin) and they are a life saver.