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

fix BeagleBone Blue support to pass pytest #283

Open
pdp7 opened this issue Oct 7, 2018 · 4 comments
Open

fix BeagleBone Blue support to pass pytest #283

pdp7 opened this issue Oct 7, 2018 · 4 comments

Comments

@pdp7
Copy link
Collaborator

pdp7 commented Oct 7, 2018

BeagleBone Blue fails to pass many of the pytest unit tests.

@pdp7 pdp7 self-assigned this Oct 7, 2018
@pdp7
Copy link
Collaborator Author

pdp7 commented Oct 7, 2018

for example:

debian@beaglebone:~/ssh/adafruit-beaglebone-io-python/test$ sudo python2 -mpytest test_adc.py
==================================================================== test session starts =====================================================================
platform linux2 -- Python 2.7.13, pytest-3.0.6, py-1.4.32, pluggy-0.4.0
rootdir: /home/debian/ssh/adafruit-beaglebone-io-python, inifile: 
collected 6 items 

test_adc.py ..FFFF

========================================================================== FAILURES ==========================================================================
___________________________________________________________________ TestAdc.test_setup_adc ___________________________________________________________________

self = <test_adc.TestAdc instance at 0xb65e2e40>

    def test_setup_adc(self):
    
>       ADC.setup()
E       RuntimeError: Unable to setup ADC system. Possible causes are: 
E         - A cape with a conflicting pin mapping is loaded 
E         - A device tree object is loaded that uses the same name for a fragment: helper

test_adc.py:23: RuntimeError
___________________________________________________________________ TestAdc.test_read_adc ____________________________________________________________________

self = <test_adc.TestAdc instance at 0xb6652828>

    def test_read_adc(self):
>       ADC.setup()
E       RuntimeError: Unable to setup ADC system. Possible causes are: 
E         - A cape with a conflicting pin mapping is loaded 
E         - A device tree object is loaded that uses the same name for a fragment: helper

test_adc.py:39: RuntimeError
_________________________________________________________________ TestAdc.test_read_raw_adc __________________________________________________________________

self = <test_adc.TestAdc instance at 0xb65f8030>

    def test_read_raw_adc(self):
>       ADC.setup()
E       RuntimeError: Unable to setup ADC system. Possible causes are: 
E         - A cape with a conflicting pin mapping is loaded 
E         - A device tree object is loaded that uses the same name for a fragment: helper

test_adc.py:46: RuntimeError
_________________________________________________________________ TestAdc.test_many_read_adc _________________________________________________________________

self = <test_adc.TestAdc instance at 0xb66012d8>

    def test_many_read_adc(self):
        import time
    
>       ADC.setup()
E       RuntimeError: Unable to setup ADC system. Possible causes are: 
E         - A cape with a conflicting pin mapping is loaded 
E         - A device tree object is loaded that uses the same name for a fragment: helper

test_adc.py:55: RuntimeError
============================================================= 4 failed, 2 passed in 0.72 seconds =============================================================

@pdp7
Copy link
Collaborator Author

pdp7 commented Oct 7, 2018

debian@beaglebone:~/ssh/adafruit-beaglebone-io-python/test$ grep /sys/ /tmp/a
1686  open("/sys/devices/platform/bone_capemgr/slots", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1686  open("/sys/devices/platform/bone_capemgr/slots", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1686  open("/sys/devices/platform/bone_capemgr/slots", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1686  open("/sys/devices/platform/bone_capemgr/slots", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)
debian@beaglebone:~/ssh/adafruit-beaglebone-io-python/test$ sudo strace -o /tmp/a -fF python2 -mpytest test_adc.py

pdp7 added a commit that referenced this issue Oct 7, 2018
beaglebone blue has complete dtb file and does not need overlays

refer to issue 283:
#283
@pdp7
Copy link
Collaborator Author

pdp7 commented Oct 7, 2018

I have updated common.c to avoid trying to load overlay (e.g. cape) when running on BeagleBone Blue:
7affea7

@pdp7
Copy link
Collaborator Author

pdp7 commented Oct 9, 2018

Right now, I think the built-in LEDs and the built-in push buttons are working with this library on the Blue

@fcooper @erikwelsh @MarkAYoder Are there BeagleBone Blue peripherals that you would like to see working with library?

Normally I look at bonescript by @jadon to know access peripherals for a given pin number. But I don't see many clues in there as to how to find the correct peripherals in /sys for a the headers on the Blue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant