Workaround test failure until TIMERn bug is fixed
Replace GPIO for test "TIMER6" with "P8_10" as TIMERn syntax is not working on newer kernels such as 4.4. This is a valid path: /sys/devices/platform/ocp/ocp:P8_10_pinmux/state while this path is invalid: /sys/devices/platform/ocp/ocp:TIMER_pinmux/state Originally discovered while testing Pull Request #152. See issue #156 for details.
This commit is contained in:
parent
3dad90d8d6
commit
713cafa28e
1 changed files with 10 additions and 2 deletions
|
|
@ -20,7 +20,11 @@ class TestSetup:
|
|||
GPIO.cleanup()
|
||||
|
||||
def test_setup_output_name(self):
|
||||
GPIO.setup("TIMER6", GPIO.OUT)
|
||||
# WARNING: TIMERn syntax is not working on newer kernels
|
||||
# such as 4.4. Originally discovered while testing
|
||||
# Pull Request #152. See issue #156 for details.
|
||||
#GPIO.setup("TIMER6", GPIO.OUT)
|
||||
GPIO.setup("P8_10", GPIO.OUT)
|
||||
assert os.path.exists('/sys/class/gpio/gpio68')
|
||||
direction = open('/sys/class/gpio/gpio68/direction').read()
|
||||
assert direction == 'out\n'
|
||||
|
|
@ -34,7 +38,11 @@ class TestSetup:
|
|||
GPIO.cleanup()
|
||||
|
||||
def test_setup_input_name(self):
|
||||
GPIO.setup("TIMER6", GPIO.IN)
|
||||
# WARNING: TIMERn syntax is not working on newer kernels
|
||||
# such as 4.4. Originally discovered while testing
|
||||
# Pull Request #152. See issue #156 for details.
|
||||
#GPIO.setup("TIMER6", GPIO.IN)
|
||||
GPIO.setup("P8_10", GPIO.IN)
|
||||
assert os.path.exists('/sys/class/gpio/gpio68')
|
||||
direction = open('/sys/class/gpio/gpio68/direction').read()
|
||||
assert direction == 'in\n'
|
||||
|
|
|
|||
Loading…
Reference in a new issue