Skip to content

Commit

Permalink
update test for issue #178
Browse files Browse the repository at this point in the history
RESULTS:

debian@beaglebone:~/ssh/adafruit-beaglebone-io-python/test$ sudo python -m pytest
=================================================== test session starts ====================================================
platform linux2 -- Python 2.7.13, pytest-3.2.3, py-1.4.34, pluggy-0.4.0
rootdir: /home/debian/ssh/adafruit-beaglebone-io-python, inifile:
collected 58 items

test_adc.py ......
test_gpio_input.py ..
test_gpio_output.py ......
test_gpio_setup.py ..........
test_led.py ..
test_pwm_setup.py ...........................
test_spi.py ..
test_uart.py ...

================================================ 58 passed in 13.31 seconds ================================================

debian@beaglebone:~/ssh/adafruit-beaglebone-io-python/test$ sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[6c2688b0be448b7bb9ca18849b430d496a84acb4]
eeprom:[A335BNLT000C3014BBBK1316]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2017-10-17]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2017.09-00002-g0f3f1c7907]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.09-rc2-00002-g84a7f2]
kernel:[4.9.57-ti-r71]
nodejs:[v6.11.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20171013.2-0rcnee1~stretch+20171013]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee1~stretch+20170829]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
debian@beaglebone:~/ssh/adafruit-beaglebone-io-python/test$

debian@beaglebone:~/ssh/adafruit-beaglebone-io-python$ sudo python ./test/issue178.py
========================
test GPIO.setup(): USR0
test GPIO.output(): USR0
test GPIO.input(): USR0=1
========================
test GPIO.setup(): USR1
test GPIO.output(): USR1
test GPIO.input(): USR1=1
========================
test GPIO.setup(): USR2
test GPIO.output(): USR2
test GPIO.input(): USR2=1
========================
test GPIO.setup(): USR3
test GPIO.output(): USR3
test GPIO.input(): USR3=1
========================
test GPIO.setup(): RED_LED
test GPIO.output(): RED_LED
test GPIO.input(): RED_LED=1
========================
test GPIO.setup(): GREEN_LED
test GPIO.output(): GREEN_LED
test GPIO.input(): GREEN_LED=1
========================
test GPIO.setup(): BAT25
test GPIO.output(): BAT25
test GPIO.input(): BAT25=1
========================
test GPIO.setup(): BAT50
test GPIO.output(): BAT50
test GPIO.input(): BAT50=1
========================
test GPIO.setup(): BAT75
test GPIO.output(): BAT75
test GPIO.input(): BAT75=1
========================
test GPIO.setup(): P8_7
test GPIO.output(): P8_7
test GPIO.input(): P8_7=1
========================
test GPIO.setup(): P8_8
test GPIO.output(): P8_8
test GPIO.input(): P8_8=1
========================
test GPIO.setup(): P8_17
test GPIO.output(): P8_17
test GPIO.input(): P8_17=1
========================
test GPIO.setup(): P8_32
test GPIO.output(): P8_32
test GPIO.input(): P8_32=1
========================
test GPIO.setup(): P8_26
test GPIO.output(): P8_26
test GPIO.input(): P8_26=1

journalctl -p debug -t python --since "1 min ago"

-- Logs begin at Tue 2017-10-24 20:55:42 UTC, end at Tue 2017-10-31 04:02:47 UTC. --
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: version <unknown> initialized
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 53 couldn't write "/sys/class/gpio/export": 16-Device or resource busy
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 53 not applicable to built-in LEDs
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: USR LED path
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/leds/beaglebone:green:usr0/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 53 0 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: USR LED path
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/leds/beaglebone:green:usr0/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 53 1 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/leds/beaglebone:green:usr0/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 53 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 54 couldn't write "/sys/class/gpio/export": 16-Device or resource busy
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 54 not applicable to built-in LEDs
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: USR LED path
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/leds/beaglebone:green:usr1/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 54 0 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: USR LED path
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/leds/beaglebone:green:usr1/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 54 1 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/leds/beaglebone:green:usr1/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 54 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 55 couldn't write "/sys/class/gpio/export": 16-Device or resource busy
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 55 not applicable to built-in LEDs
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: USR LED path
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/leds/beaglebone:green:usr2/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 55 0 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: USR LED path
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/leds/beaglebone:green:usr2/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 55 1 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/leds/beaglebone:green:usr2/brightness
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 55 OK
Oct 31 04:02:43 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 56 couldn't write "/sys/class/gpio/export": 16-Device or resource busy
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 56 not applicable to built-in LEDs
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: USR LED path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/leds/beaglebone:green:usr3/brightness
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 56 0 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: USR LED path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/leds/beaglebone:green:usr3/brightness
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 56 1 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/leds/beaglebone:green:usr3/brightness
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 56 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 66 already exported
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 66 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio66/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 66 0 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio66/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 66 1 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/gpio/gpio66/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 66 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 67 already exported
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 67 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio67/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 67 0 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio67/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 67 1 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/gpio/gpio67/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 67 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 27 already exported
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 27 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio27/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 27 0 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio27/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 27 1 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: default gpio path
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/gpio/gpio27/value
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 27 OK
Oct 31 04:02:44 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 11 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 11 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio11/value
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 11 0 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio11/value
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 11 1 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: default gpio path
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/gpio/gpio11/value
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 11 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 61 already exported
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 61 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio61/value
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 61 0 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio61/value
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 61 1 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: default gpio path
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio open_value_file: filename=/sys/class/gpio/gpio61/value
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 61 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 66 already exported
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 66 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio66/value
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 66 0 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio66/value
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 66 1 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 66 OK
Oct 31 04:02:45 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 67 already exported
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 67 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio67/value
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 67 0 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio67/value
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 67 1 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 67 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 27 already exported
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 27 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio27/value
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 27 0 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio27/value
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 27 1 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 27 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 11 already exported
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 11 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio11/value
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 11 0 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio11/value
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 11 1 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 11 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_export: 61 already exported
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_direction: 61 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio61/value
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 61 0 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: default gpio path
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: filename=/sys/class/gpio/gpio61/value
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_set_value: 61 1 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_get_value: 61 OK
Oct 31 04:02:46 beaglebone python[14351]: Adafruit_BBIO: gpio_unexport: 11 OK
  • Loading branch information
pdp7 committed Oct 31, 2017
1 parent 1b3dab6 commit d75e0c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/issue178.py
Expand Up @@ -35,7 +35,11 @@

import Adafruit_BBIO.GPIO as GPIO

test_pins = [ "P8_7", "P8_8", "P8_17", "P8_32", "P8_26" ]
test_pins = [
"USR0", "USR1", "USR2", "USR3",
"RED_LED", "GREEN_LED", "BAT25", "BAT50", "BAT75",
"P8_7", "P8_8", "P8_17", "P8_32", "P8_26"
]

for pin in test_pins:
print("========================")
Expand Down

0 comments on commit d75e0c8

Please sign in to comment.