Repository navigation
Fix CI tests - #481
Fix CI tests#481
Conversation
| r_ok = mode & stat.S_IRGRP | ||
| w_ok = mode & stat.S_IWGRP | ||
| r_ok = mode & stat.S_IRUSR | ||
| w_ok = mode & stat.S_IWUSR |
There was a problem hiding this comment.
Can we alter group permissions on the CI server before running the tests?
There was a problem hiding this comment.
Hmph, I was wondering about that. We probably can add such logic to the fake-sys script as long as we know what to add... I assume it's a chmod call with these flags added but I don't fully understand the Unix permissions model so I'd have to test it.
There was a problem hiding this comment.
May be something like chown -R $USER:$USER to change group to the current user and/or chmod -R g+rw to allow group member to read/write?
There was a problem hiding this comment.
We use copy the devices from devices, and python's shutil.copytree should copy permissions, so may be adding chmod/chown calls to the travis script would be enough:
https://github.com/ev3dev/ev3dev-lang-python/blob/jessie/.travis.yml#L8
|
I can't reproduce this error locally, despite using the official docker image and replicating the build commands used in the real environment. Nonetheless, there certainly is a difference. Locally: On their agent: Note the bit of interest -- group write -- isn't set in the real env. Going to test out some things now. Build in question: https://travis-ci.org/ev3dev/ev3dev-lang-python/builds/402969142 |
|
Local: Remote: I'm inclined to believe that setting that bit in the source directory both will work and is the correct approach. Will test. |
🎉 I'll update the PR tomorrow (my time; I need some sleep). script:
- chmod -R g+rw ./tests/fake-sys/devices/**/*
- ./tests/api_tests.py |
|
Updated with the new fix |
First commit adds a failing test (we didn't write to properties before); second commit fixes it 💪😎. I don't entirely understand why the files had different permissions on the CI server from what I see when I clone in Ubuntu locally, but whatever the issue is, checking for user permissions seems to work. I'll validate this on an EV3 soon to confirm I didn't cause any regressions.