tests enable bezier and search_min

This commit is contained in:
Daniel Agar
2019-02-22 16:23:57 -05:00
parent 0b4751d031
commit e4b3c8bcc6
3 changed files with 53 additions and 45 deletions
+2
View File
@@ -5,6 +5,7 @@
# TODO: find a way to keep this in sync with tests_main # TODO: find a way to keep this in sync with tests_main
set(tests set(tests
autodeclination autodeclination
bezier
bson bson
commander commander
controllib controllib
@@ -27,6 +28,7 @@ set(tests
parameters parameters
perf perf
rc rc
search_min
servo servo
sf0x sf0x
sleep sleep
+1 -1
View File
@@ -40,7 +40,7 @@
#include <float.h> #include <float.h>
#include <math.h> #include <math.h>
#include "../../lib/mathlib/math/SearchMin.hpp" #include <mathlib/math/SearchMin.hpp>
// linear function // linear function
float _linear_function(float x) float _linear_function(float x)
+50 -44
View File
@@ -65,22 +65,63 @@ const struct {
#define OPT_NOALLTEST (1<<1) #define OPT_NOALLTEST (1<<1)
#define OPT_NOJIGTEST (1<<2) #define OPT_NOJIGTEST (1<<2)
} tests[] = { } tests[] = {
{"help", test_help, OPT_NOALLTEST | OPT_NOHELP | OPT_NOJIGTEST}, {"help", test_help, OPT_NOALLTEST | OPT_NOHELP | OPT_NOJIGTEST},
{"all", test_all, OPT_NOALLTEST | OPT_NOJIGTEST}, {"all", test_all, OPT_NOALLTEST | OPT_NOJIGTEST},
{"jig", test_jig, OPT_NOJIGTEST | OPT_NOALLTEST}, {"jig", test_jig, OPT_NOJIGTEST | OPT_NOALLTEST},
#ifdef __PX4_NUTTX #ifdef __PX4_NUTTX
{"adc", test_adc, OPT_NOJIGTEST}, {"adc", test_adc, OPT_NOJIGTEST},
{"file", test_file, OPT_NOJIGTEST | OPT_NOALLTEST}, {"file", test_file, OPT_NOJIGTEST | OPT_NOALLTEST},
{"led", test_led, 0}, {"led", test_led, 0},
{"sensors", test_sensors, 0}, {"sensors", test_sensors, 0},
{"time", test_time, OPT_NOJIGTEST}, {"time", test_time, OPT_NOJIGTEST},
{"uart_baudchange", test_uart_baudchange, OPT_NOJIGTEST}, {"uart_baudchange", test_uart_baudchange, OPT_NOJIGTEST},
{"uart_break", test_uart_break, OPT_NOJIGTEST | OPT_NOALLTEST}, {"uart_break", test_uart_break, OPT_NOJIGTEST | OPT_NOALLTEST},
{"uart_console", test_uart_console, OPT_NOJIGTEST | OPT_NOALLTEST}, {"uart_console", test_uart_console, OPT_NOJIGTEST | OPT_NOALLTEST},
#else #else
{"rc", rc_tests_main, 0}, {"rc", rc_tests_main, 0},
#endif /* __PX4_NUTTX */ #endif /* __PX4_NUTTX */
{"autodeclination", test_autodeclination, 0},
{"bezier", test_bezierQuad, 0},
{"bson", test_bson, 0},
{"conv", test_conv, 0},
{"ctlmath", test_controlmath, 0},
{"dataman", test_dataman, OPT_NOJIGTEST | OPT_NOALLTEST},
{"file2", test_file2, OPT_NOJIGTEST},
{"float", test_float, 0},
{"hott_telemetry", test_hott_telemetry, OPT_NOJIGTEST | OPT_NOALLTEST},
{"hrt", test_hrt, OPT_NOJIGTEST | OPT_NOALLTEST},
{"hysteresis", test_hysteresis, 0},
{"hysteresis", test_hysteresis, 0},
{"int", test_int, 0},
{"jig_voltages", test_jig_voltages, OPT_NOALLTEST},
{"mathlib", test_mathlib, 0},
{"matrix", test_matrix, 0},
{"microbench_hrt", test_microbench_hrt, 0},
{"microbench_math", test_microbench_math, 0},
{"microbench_matrix", test_microbench_matrix, 0},
{"microbench_uorb", test_microbench_uorb, 0},
{"mixer", test_mixer, OPT_NOJIGTEST},
{"mixer", test_mixer, OPT_NOJIGTEST},
{"mount", test_mount, OPT_NOJIGTEST | OPT_NOALLTEST},
{"param", test_param, 0},
{"parameters", test_parameters, 0},
{"perf", test_perf, OPT_NOJIGTEST},
{"ppm", test_ppm, OPT_NOJIGTEST | OPT_NOALLTEST},
{"ppm_loopback", test_ppm_loopback, OPT_NOALLTEST},
{"rc", test_rc, OPT_NOJIGTEST | OPT_NOALLTEST},
{"search_min", test_search_min, 0},
{"servo", test_servo, OPT_NOJIGTEST | OPT_NOALLTEST},
{"sleep", test_sleep, OPT_NOJIGTEST},
{"smoothz", test_smooth_z, 0},
{"tone", test_tone, 0},
{"uart_loopback", test_uart_loopback, OPT_NOJIGTEST | OPT_NOALLTEST},
{"uart_send", test_uart_send, OPT_NOJIGTEST | OPT_NOALLTEST},
{"versioning", test_versioning, 0},
/* external tests */ /* external tests */
{"commander", commander_tests_main, 0}, {"commander", commander_tests_main, 0},
{"controllib", controllib_test_main, 0}, {"controllib", controllib_test_main, 0},
@@ -89,42 +130,7 @@ const struct {
#endif #endif
{"sf0x", sf0x_tests_main, 0}, {"sf0x", sf0x_tests_main, 0},
{"uorb", uorb_tests_main, 0}, {"uorb", uorb_tests_main, 0},
{"hysteresis", test_hysteresis, 0},
{"mixer", test_mixer, OPT_NOJIGTEST},
{"autodeclination", test_autodeclination, 0},
{"bezier", test_bezierQuad, 0},
{"bson", test_bson, 0},
{"conv", test_conv, 0},
{"dataman", test_dataman, OPT_NOJIGTEST | OPT_NOALLTEST},
{"file2", test_file2, OPT_NOJIGTEST},
{"float", test_float, 0},
{"hott_telemetry", test_hott_telemetry, OPT_NOJIGTEST | OPT_NOALLTEST},
{"hrt", test_hrt, OPT_NOJIGTEST | OPT_NOALLTEST},
{"int", test_int, 0},
{"jig_voltages", test_jig_voltages, OPT_NOALLTEST},
{"mathlib", test_mathlib, 0},
{"matrix", test_matrix, 0},
{"microbench_hrt", test_microbench_hrt, 0},
{"microbench_math", test_microbench_math, 0},
{"microbench_matrix", test_microbench_matrix, 0},
{"microbench_uorb", test_microbench_uorb, 0},
{"mount", test_mount, OPT_NOJIGTEST | OPT_NOALLTEST},
{"param", test_param, 0},
{"parameters", test_parameters, 0},
{"perf", test_perf, OPT_NOJIGTEST},
{"ppm", test_ppm, OPT_NOJIGTEST | OPT_NOALLTEST},
{"ppm_loopback", test_ppm_loopback, OPT_NOALLTEST},
{"rc", test_rc, OPT_NOJIGTEST | OPT_NOALLTEST},
{"search_min", test_search_min, 0},
{"servo", test_servo, OPT_NOJIGTEST | OPT_NOALLTEST},
{"sleep", test_sleep, OPT_NOJIGTEST},
{"tone", test_tone, 0},
{"uart_loopback", test_uart_loopback, OPT_NOJIGTEST | OPT_NOALLTEST},
{"uart_send", test_uart_send, OPT_NOJIGTEST | OPT_NOALLTEST},
{"versioning", test_versioning, 0},
{"ctlmath", test_controlmath, 0},
{"smoothz", test_smooth_z, 0},
{NULL, NULL, 0} {NULL, NULL, 0}
}; };