diff --git a/platforms/posix/cmake/sitl_tests.cmake b/platforms/posix/cmake/sitl_tests.cmake
index 778cfab3ecf0b666d7d68c709d4f669d710ec9a8..0b5f23ca6b5481876209052c620b5aa3352bffbb 100644
--- a/platforms/posix/cmake/sitl_tests.cmake
+++ b/platforms/posix/cmake/sitl_tests.cmake
@@ -5,6 +5,7 @@
 # TODO: find a way to keep this in sync with tests_main
 set(tests
 	autodeclination
+	bezier
 	bson
 	commander
 	controllib
@@ -27,6 +28,7 @@ set(tests
 	parameters
 	perf
 	rc
+	search_min
 	servo
 	sf0x
 	sleep
diff --git a/src/systemcmds/tests/test_search_min.cpp b/src/systemcmds/tests/test_search_min.cpp
index da653b5154e4d18bc2ce13fc70401c84f9ce7ae9..e0d1f77fab2ef417980b6419389082e0b2b5236e 100644
--- a/src/systemcmds/tests/test_search_min.cpp
+++ b/src/systemcmds/tests/test_search_min.cpp
@@ -40,7 +40,7 @@
 #include <float.h>
 #include <math.h>
 
-#include "../../lib/mathlib/math/SearchMin.hpp"
+#include <mathlib/math/SearchMin.hpp>
 
 // linear function
 float _linear_function(float x)
diff --git a/src/systemcmds/tests/tests_main.c b/src/systemcmds/tests/tests_main.c
index 4fba8333fc0e7f1e8bfb03d8c2c233a2188163c4..84cd6878ff14d45c7f652d4e96fef6d869ec8531 100644
--- a/src/systemcmds/tests/tests_main.c
+++ b/src/systemcmds/tests/tests_main.c
@@ -65,22 +65,63 @@ const struct {
 #define OPT_NOALLTEST	(1<<1)
 #define OPT_NOJIGTEST	(1<<2)
 } tests[] = {
-	{"help",		test_help,	OPT_NOALLTEST | OPT_NOHELP | OPT_NOJIGTEST},
-	{"all",			test_all,	OPT_NOALLTEST | OPT_NOJIGTEST},
-	{"jig",			test_jig,	OPT_NOJIGTEST | OPT_NOALLTEST},
+	{"help",		test_help,		OPT_NOALLTEST | OPT_NOHELP | OPT_NOJIGTEST},
+	{"all",			test_all,		OPT_NOALLTEST | OPT_NOJIGTEST},
+	{"jig",			test_jig,		OPT_NOJIGTEST | OPT_NOALLTEST},
+
 #ifdef __PX4_NUTTX
-	{"adc",			test_adc,	OPT_NOJIGTEST},
-	{"file",		test_file,	OPT_NOJIGTEST | OPT_NOALLTEST},
-	{"led",			test_led,	0},
-	{"sensors",		test_sensors,	0},
-	{"time",		test_time,	OPT_NOJIGTEST},
+	{"adc",			test_adc,		OPT_NOJIGTEST},
+	{"file",		test_file,		OPT_NOJIGTEST | OPT_NOALLTEST},
+	{"led",			test_led,		0},
+	{"sensors",		test_sensors,		0},
+	{"time",		test_time,		OPT_NOJIGTEST},
 	{"uart_baudchange",	test_uart_baudchange,	OPT_NOJIGTEST},
 	{"uart_break",		test_uart_break,	OPT_NOJIGTEST | OPT_NOALLTEST},
 	{"uart_console",	test_uart_console,	OPT_NOJIGTEST | OPT_NOALLTEST},
 #else
-	{"rc",			rc_tests_main,	0},
+	{"rc",			rc_tests_main,		0},
 #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 */
 	{"commander",		commander_tests_main,	0},
 	{"controllib",		controllib_test_main,	0},
@@ -89,42 +130,7 @@ const struct {
 #endif
 	{"sf0x",		sf0x_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}
 };