You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ddemidov@WasabiFan do either of you remember how to run the tests? I was going to work on this but I've never actually run the tests and couldn't find docs on it.
Woah, we have tests? 😆 But seriously, I think you just have to run the api_tests.py file. I'm not 100% sure they've been confirmed working since we upgraded to Python3 though.
ah I did not have fake-sys that was part of my problem. @ddemidov we create a directory called lego-sensor/sensor0 and cp the contents of /sys/class/lego-sensor/sensor0 to that directory
So this has to run on a device running ev3dev? I'm not following how we are running the tests in github on each commit unless we have an ev3dev vm that spins up to run the tests
The tests do not need to be run on the EV3. We create a fake filesystem that contains device attributes, and use that to test our IO functions. This is not ideal, but allows us to use continuous integration services like Travis-CI. See more here:
We just used the README to take notes for future documentation purposes on one part of the process, you don't actually have to run those commands. See the message above them:
Activity
dwalton76 commentedon Sep 1, 2017
@ddemidov @WasabiFan do either of you remember how to run the tests? I was going to work on this but I've never actually run the tests and couldn't find docs on it.
WasabiFan commentedon Sep 1, 2017
Woah, we have tests? 😆 But seriously, I think you just have to run the
api_tests.pyfile. I'm not 100% sure they've been confirmed working since we upgraded to Python3 though.ddemidov commentedon Sep 1, 2017
We do have tests and they are run on every commit and every pull request here:
https://travis-ci.org/rhempel/ev3dev-lang-python/builds
The steps needed to run the tests are 'documented' here:
https://github.com/rhempel/ev3dev-lang-python/blob/develop/.travis.yml#L8
WasabiFan commentedon Sep 1, 2017
I was joking! 😆 Well, mostly. I totally forgot we ran them in CO builds though.
dwalton76 commentedon Sep 1, 2017
ah I did not have fake-sys that was part of my problem. @ddemidov we create a directory called lego-sensor/sensor0 and cp the contents of /sys/class/lego-sensor/sensor0 to that directory
So this has to run on a device running ev3dev? I'm not following how we are running the tests in github on each commit unless we have an ev3dev vm that spins up to run the tests
When I run it I get
which matches up with the output from https://travis-ci.org/rhempel/ev3dev-lang-python/builds/270811841
Just trying to get my head wrapped around how this works (or is supposed to work)
ddemidov commentedon Sep 1, 2017
The tests do not need to be run on the EV3. We create a fake filesystem that contains device attributes, and use that to test our IO functions. This is not ideal, but allows us to use continuous integration services like Travis-CI. See more here:
dwalton76 commentedon Sep 2, 2017
My confusion is around these instructions in the README of the test directory
which on a non ev3dev machine leaves you with
I renamed that lego-sensor directory to garbage and re-ran api_tests.py and got the same results. It seems that the README should say something like
Is the copied lego-sensor directory (assuming you ran this on ev3dev) what was used before the days of fake-sys?
WasabiFan commentedon Sep 2, 2017
We just used the README to take notes for future documentation purposes on one part of the process, you don't actually have to run those commands. See the message above them:
The submodule contains the data already.
dwalton76 commentedon Sep 7, 2017
fixed