mirror of https://github.com/ARMmbed/mbed-os.git
Added autodetection fior tests including MMA8451Q accelerometer
parent
34b55c81eb
commit
f40ec7a294
|
@ -29,6 +29,11 @@ float calc_3d_vector_len(float x, float y, float z) {
|
|||
#define MEASURE_DEVIATION_TOLERANCE 0.025 // 2.5%
|
||||
|
||||
int main(void) {
|
||||
TEST_TIMEOUT(15);
|
||||
TEST_HOSTTEST(default_auto);
|
||||
TEST_DESCRIPTION(MMA8451Q accelerometer);
|
||||
TEST_START("KL25Z_5");
|
||||
|
||||
DigitalOut led(LED_GREEN);
|
||||
MMA8451Q acc(SDA, SCL, MMA8451_I2C_ADDRESS);
|
||||
bool result = true;
|
||||
|
@ -47,5 +52,5 @@ int main(void) {
|
|||
wait(0.5);
|
||||
led = !led;
|
||||
}
|
||||
notify_completion(result);
|
||||
TEST_RESULT(result);
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ class Test(HostTestResults):
|
|||
def print_result(self, result):
|
||||
""" Test result unified printing function
|
||||
"""
|
||||
self.notify("\n{{%s}}\n{{end}}" % result)
|
||||
self.notify("\r\n{{%s}}\r\n{{end}}" % result)
|
||||
|
||||
|
||||
class DefaultTestSelector(Test):
|
||||
|
|
|
@ -584,7 +584,12 @@ TESTS = [
|
|||
"duration": 15,
|
||||
"automated": True,
|
||||
#"host_test": "wait_us_auto",
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE", "NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8", "NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC", "DISCO_F401VC"],
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812",
|
||||
"KL25Z", "KL05Z", "K64F", "KL46Z",
|
||||
"RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE",
|
||||
"NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8",
|
||||
"NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC",
|
||||
"DISCO_F401VC"],
|
||||
},
|
||||
{
|
||||
"id": "RTOS_2", "description": "Mutex resource lock",
|
||||
|
@ -592,7 +597,12 @@ TESTS = [
|
|||
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB],
|
||||
"duration": 20,
|
||||
"automated": True,
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE", "NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8", "NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC", "DISCO_F401VC"],
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812",
|
||||
"KL25Z", "KL05Z", "K64F", "KL46Z",
|
||||
"RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE",
|
||||
"NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8",
|
||||
"NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC",
|
||||
"DISCO_F401VC"],
|
||||
},
|
||||
{
|
||||
"id": "RTOS_3", "description": "Semaphore resource lock",
|
||||
|
@ -600,28 +610,48 @@ TESTS = [
|
|||
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB],
|
||||
"duration": 20,
|
||||
"automated": True,
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE", "NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8", "NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC", "DISCO_F401VC"],
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812",
|
||||
"KL25Z", "KL05Z", "K64F", "KL46Z",
|
||||
"RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE",
|
||||
"NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8",
|
||||
"NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC",
|
||||
"DISCO_F401VC"],
|
||||
},
|
||||
{
|
||||
"id": "RTOS_4", "description": "Signals messaging",
|
||||
"source_dir": join(TEST_DIR, "rtos", "mbed", "signals"),
|
||||
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB],
|
||||
"automated": True,
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE", "NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8", "NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC", "DISCO_F401VC"],
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812",
|
||||
"KL25Z", "KL05Z", "K64F", "KL46Z",
|
||||
"RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE",
|
||||
"NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8",
|
||||
"NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC",
|
||||
"DISCO_F401VC"],
|
||||
},
|
||||
{
|
||||
"id": "RTOS_5", "description": "Queue messaging",
|
||||
"source_dir": join(TEST_DIR, "rtos", "mbed", "queue"),
|
||||
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB],
|
||||
"automated": True,
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE", "NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8", "NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC", "DISCO_F401VC"],
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812",
|
||||
"KL25Z", "KL05Z", "K64F", "KL46Z",
|
||||
"RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE",
|
||||
"NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8",
|
||||
"NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC",
|
||||
"DISCO_F401VC"],
|
||||
},
|
||||
{
|
||||
"id": "RTOS_6", "description": "Mail messaging",
|
||||
"source_dir": join(TEST_DIR, "rtos", "mbed", "mail"),
|
||||
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB],
|
||||
"automated": True,
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE", "NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8", "NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC", "DISCO_F401VC"],
|
||||
"mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812",
|
||||
"KL25Z", "KL05Z", "K64F", "KL46Z",
|
||||
"RZ_A1H", "DISCO_F407VG", "DISCO_F429ZI", "NUCLEO_F411RE",
|
||||
"NUCLEO_F401RE", "NUCLEO_F334R8", "DISCO_F334C8", "NUCLEO_F302R8",
|
||||
"NUCLEO_L053R8", "DISCO_L053C8", "NUCLEO_F072RB", "NUCLEO_F091RC",
|
||||
"DISCO_F401VC"],
|
||||
},
|
||||
{
|
||||
"id": "RTOS_7", "description": "Timer",
|
||||
|
@ -863,7 +893,7 @@ TESTS = [
|
|||
{
|
||||
"id": "KL25Z_5", "description": "MMA8451Q accelerometer",
|
||||
"source_dir": join(TEST_DIR, "mbed", "i2c_MMA8451Q"),
|
||||
"dependencies": [MBED_LIBRARIES, TEST_MBED_LIB, join(PERIPHERALS, 'MMA8451Q')],
|
||||
"dependencies": [MBED_LIBRARIES, TEST_MBED_LIB, join(PERIPHERALS, 'MMA8451Q'), TEST_MBED_LIB],
|
||||
"mcu": ["KL25Z", "KL05Z", "KL46Z", "K20D50M"],
|
||||
"automated": True,
|
||||
"duration": 15,
|
||||
|
|
Loading…
Reference in New Issue