mirror of https://github.com/ARMmbed/mbed-os.git
Feature: Device detection via serial - part 4
Interrupt In test pinology for NUCLEO changedpull/523/head
parent
da412da174
commit
2ab8ad9b47
|
@ -5,5 +5,6 @@ int main() {
|
|||
notify_start();
|
||||
printf("MBED: Target '%s'\r\n", TEST_SUITE_TARGET_NAME);
|
||||
printf("MBED: Test ID '%s'\r\n", TEST_SUITE_TEST_ID);
|
||||
printf("MBED: UUID '%s'\r\n", TEST_SUITE_UUID);
|
||||
notify_completion(true);
|
||||
}
|
||||
|
|
|
@ -30,11 +30,15 @@ unsigned int testenv_randseed();
|
|||
|
||||
// macros passed via test suite
|
||||
#ifndef TEST_SUITE_TARGET_NAME
|
||||
#define TEST_SUITE_TARGET_NAME ""
|
||||
#define TEST_SUITE_TARGET_NAME "Unknown"
|
||||
#endif
|
||||
|
||||
#ifndef TEST_SUITE_TEST_ID
|
||||
#define TEST_SUITE_TEST_ID ""
|
||||
#define TEST_SUITE_TEST_ID "Unknown"
|
||||
#endif
|
||||
|
||||
#ifndef TEST_SUITE_UUID
|
||||
#define TEST_SUITE_UUID "Unknown"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,7 @@ void in_handler() {
|
|||
defined(TARGET_NUCLEO_L053R8) || \
|
||||
defined(TARGET_NUCLEO_L152RE)
|
||||
#define PIN_IN PB_8
|
||||
#define PIN_OUT PC_6
|
||||
#define PIN_OUT PC_7
|
||||
|
||||
#elif defined(TARGET_DISCO_F407VG)
|
||||
#define PIN_OUT PC_12
|
||||
|
|
|
@ -52,6 +52,14 @@ class DetectPlatformTest(DefaultTest):
|
|||
print "HOST: MUT Target name '%s', expected '%s'... [%s]"% (micro_name, self.mbed.options.micro, "OK" if micro_cmp else "FAIL")
|
||||
stdout.flush()
|
||||
|
||||
for i in range(0, 2):
|
||||
c = self.mbed.serial_readline()
|
||||
if c is None:
|
||||
self.print_result("ioerr_serial")
|
||||
return
|
||||
print c.strip()
|
||||
stdout.flush()
|
||||
|
||||
if result: # Hello World received
|
||||
self.print_result('success')
|
||||
else:
|
||||
|
|
|
@ -21,6 +21,7 @@ import os
|
|||
import re
|
||||
import sys
|
||||
import json
|
||||
import uuid
|
||||
import pprint
|
||||
import random
|
||||
import optparse
|
||||
|
@ -377,6 +378,7 @@ class SingleTestRunner(object):
|
|||
MACROS.extend(LIBRARY_MAP[lib_id]['macros'])
|
||||
MACROS.append('TEST_SUITE_TARGET_NAME="%s"'% target)
|
||||
MACROS.append('TEST_SUITE_TEST_ID="%s"'% test_id)
|
||||
MACROS.append('TEST_SUITE_UUID="%s"'% str(uuid.uuid4()))
|
||||
|
||||
project_name = self.opts_firmware_global_name if self.opts_firmware_global_name else None
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue