POSIX: ported systemcmds/tests

Most of the systemcmds tests run in the posix build. The UART tests
fail for me as I do not have a UART connected.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-07-01 07:51:24 -07:00
parent 9c7450248f
commit 1e46f44123
30 changed files with 285 additions and 238 deletions
+6 -6
View File
@@ -37,6 +37,7 @@
****************************************************************************/
#include <px4_config.h>
#include <px4_posix.h>
#include <sys/types.h>
@@ -45,9 +46,8 @@
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/analog/adc.h>
#include <px4_adc.h>
#include "tests.h"
@@ -93,7 +93,7 @@ int test_gpio(int argc, char *argv[])
#ifdef PX4IO_DEVICE_PATH
int fd = open(PX4IO_DEVICE_PATH, 0);
int fd = px4_open(PX4IO_DEVICE_PATH, 0);
if (fd < 0) {
printf("GPIO: open fail\n");
@@ -101,16 +101,16 @@ int test_gpio(int argc, char *argv[])
}
/* set all GPIOs to default state */
ioctl(fd, GPIO_RESET, ~0);
px4_ioctl(fd, GPIO_RESET, ~0);
/* XXX need to add some GPIO waving stuff here */
/* Go back to default */
ioctl(fd, GPIO_RESET, ~0);
px4_ioctl(fd, GPIO_RESET, ~0);
close(fd);
px4_close(fd);
printf("\t GPIO test successful.\n");
#endif