Closed edlins closed 6 years ago
Been following the updates - good stuff!
I will give it a test after work and let you know.
ctest -V
fails, but due to address issue. I will try to look into that, but will do the other tests first.
Output from ctest -v
:
root@raspberrypi:/usr/local/src/edlins/libPCA9685 # ctest -V
UpdateCTestConfiguration from :/usr/local/src/edlins/libPCA9685/DartConfiguration.tcl
UpdateCTestConfiguration from :/usr/local/src/edlins/libPCA9685/DartConfiguration.tcl
Test project /usr/local/src/edlins/libPCA9685
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: run_test
1: Test command: /bin/sh "-xc" "./PCA9685test -td 1 40 > PCA9685_actual_output" "2>&1"
1: Test timeout computed to be: 9.99988e+06
1: + ./PCA9685test -td 1 40
1/2 Test #1: run_test ......................... Passed 0.03 sec
test 2
Start 2: diff_output
2: Test command: /bin/sh "-xc" "diff ../test/PCA9685_expected_output ./PCA9685_actual_output" "2>&1"
2: Test timeout computed to be: 9.99988e+06
2: + diff ../test/PCA9685_expected_output ./PCA9685_actual_output
2: diff: ../test/PCA9685_expected_output: No such file or directory
2/2 Test #2: diff_output ......................***Failed 0.03 sec
50% tests passed, 1 tests failed out of 2
Total Test time (real) = 0.11 sec
The following tests FAILED:
2 - diff_output (Failed)
Errors while running CTest
And, it turns out I left all of my 12V ready LEDs on the boat on the weekend, but I ran the tests just probing the outputs with my meter, and it looks good!
Output from ./PCA9685test 1 42
:
testFailOpenI2C
_PCA9685_open: open() returned -1
PCA9685_openI2C(): _PCA9685_open() returned -1 for /dev/i2c-0
_PCA9685_ioctl(): ioctl() returned -1
PCA9685_openI2C(): _PCA9685_ioctl() returned -1 for addr 240
passed
testOpenI2C
passed
testFailInitPWM
_PCA9685_ioctl(): ioctl() returned -1
_PCA9685_writeI2CRaw(): _PCA9685_ioctl() returned -1 on addr 00
_PCA9685_writeI2CRaw(): len = 1, buf = 06
PCA9685_initPWM(): _PCA9685_writeI2CRaw() returned -1
_PCA9685_ioctl(): ioctl() returned -1
_PCA9685_writeI2CRaw(): _PCA9685_ioctl() returned -1 on addr 10
_PCA9685_writeI2CRaw(): len = 2, buf = fa 00
_PCA9685_writeI2CReg(): _PCA9685_writeI2CRaw() returned -1 on addr 10 reg fa
PCA9685_setPWMVal(): _PCA9685_writeI2CReg() returned -1 on addr 10 reg fa val 00
PCA9685_setAllPWM(): PCA9685_setPWMVal() returned -1
PCA9685_initPWM(): PCA9685_setAllPWM() returned -1
passed
testInitPWM
passed
testFailWriteAllChannels
_PCA9685_ioctl(): ioctl() returned -1
_PCA9685_writeI2CRaw(): _PCA9685_ioctl() returned -1 on addr 42
_PCA9685_writeI2CRaw(): len = 65, buf = 06 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f 00 00 ff 0f
_PCA9685_writeI2CReg(): _PCA9685_writeI2CRaw() returned -1 on addr 42 reg 06
PCA9685_setPWMVals(): _PCA9685_writeI2CReg() returned -1, addr 42, reg 06, len 64
passed
testWriteAllChannels
passed
testTurnOffAllChannels
passed
All tests passed.
PCA9685demo appeared to work properly as well (Again, just probing with the meter... too lazy to get the scope out just now, but it looks fine)
Looking good, great work!
Side note: I got much of my lighting installed on my boat last weekend and plan to finish this weekend, and I will be wanting this to use to help me modulate my lighting, so the work is appreciated, and you can bet I will have some things to add soon!
Cool, thanks!
2: Test command: /bin/sh "-xc" "diff ../test/PCA9685_expected_output ./PCA9685_actual_output" "2>&1"
2: Test timeout computed to be: 9.99988e+06
2: + diff ../test/PCA9685_expected_output ./PCA9685_actual_output
2: diff: ../test/PCA9685_expected_output: No such file or directory
2/2 Test #2: diff_output ......................***Failed 0.03 sec
When you are in build/
can you look at ../test/
and see if there's a file PCA9685_expected_output
? If it's there try
diff ../test/PCA9685_expected_output ./PCA9685_actual_output
and if that works try ctest -V
again. I'm curious as to why that test failed for you but worked for me and in Travis. That file with the expected output should have come down with your fetch. To be sure, please try a fresh, complete fetch into a new folder with something like
mkdir temp && cd temp && git init
git fetch git://www.github.com/edlins/libPCA9685.git develop
git checkout FETCH_HEAD
That will make a temporary workspace with develop
. You can safely cd ..
and rm -rf temp
when done.
OOPS.
When I tested I did a clean checkout of the develop branch, but I was in a hurry and instead of making a build directory I just ran cmake .
in the main dir... RTFM
(I would normally do that, but was in a hurry... sorry about that!)
Anyway - looks good after applying the RTFM patch ;)
root@raspberrypi:/usr/local/src/edlins/dev/build # ctest -V
UpdateCTestConfiguration from :/usr/local/src/edlins/dev/build/DartConfiguration.tcl
UpdateCTestConfiguration from :/usr/local/src/edlins/dev/build/DartConfiguration.tcl
Test project /usr/local/src/edlins/dev/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: run_test
1: Test command: /bin/sh "-xc" "./PCA9685test -td 1 40 > PCA9685_actual_output" "2>&1"
1: Test timeout computed to be: 9.99988e+06
1: + ./PCA9685test -td 1 40
1/2 Test #1: run_test ......................... Passed 0.03 sec
test 2
Start 2: diff_output
2: Test command: /bin/sh "-xc" "diff ../test/PCA9685_expected_output ./PCA9685_actual_output" "2>&1"
2: Test timeout computed to be: 9.99988e+06
2: + diff ../test/PCA9685_expected_output ./PCA9685_actual_output
2/2 Test #2: diff_output ...................... Passed 0.02 sec
100% tests passed, 0 tests failed out of 2
Total Test time (real) = 0.09 sec
root@raspberrypi:/usr/local/src/edlins/dev/build #
Turns out doing mkdir build; cd build; cmake ..
is important for this ;)
I would have figured it out on my own, but was hurrying... I likely shouldn't have posted my results until I really took the time to test it correctly. Sorry about that!
NP, thanks for verifying! It's worth taking a little extra time to get the release right. I don't want to manage patches on releases if I can avoid it. Eventually I'll use CPack to build release packages but until then I'll add notes to the readme about how to download and compile master
or develop
.
Merged! Also created "superfast" release for v0.6.
@pvint I'm ready to merge develop into master as version 0.6. If you get a sec, do you mind pulling the current develop branch and giving it a quick test? Minimally, I'd just like someone else to build it and run:
ctest -V
(runs PCA9685test in testmode, captures faked output, compares to expected output)PCA9685test 1 40
(use your adapter number and 9685 address, flashes the lights briefly)PCA9685demo 1 40
(same params, auto mode cycling colors, ctrl-c to quit and turn off lights)You can also review the changes to README and CHANGELOG or even review the source, but that takes a lot more time and is totally optional. I'll wait on this for up to a few days and just merge it if I don't hear back. Thanks!