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();
|
notify_start();
|
||||||
printf("MBED: Target '%s'\r\n", TEST_SUITE_TARGET_NAME);
|
printf("MBED: Target '%s'\r\n", TEST_SUITE_TARGET_NAME);
|
||||||
printf("MBED: Test ID '%s'\r\n", TEST_SUITE_TEST_ID);
|
printf("MBED: Test ID '%s'\r\n", TEST_SUITE_TEST_ID);
|
||||||
|
printf("MBED: UUID '%s'\r\n", TEST_SUITE_UUID);
|
||||||
notify_completion(true);
|
notify_completion(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,11 +30,15 @@ unsigned int testenv_randseed();
|
||||||
|
|
||||||
// macros passed via test suite
|
// macros passed via test suite
|
||||||
#ifndef TEST_SUITE_TARGET_NAME
|
#ifndef TEST_SUITE_TARGET_NAME
|
||||||
#define TEST_SUITE_TARGET_NAME ""
|
#define TEST_SUITE_TARGET_NAME "Unknown"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TEST_SUITE_TEST_ID
|
#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
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,7 +47,7 @@ void in_handler() {
|
||||||
defined(TARGET_NUCLEO_L053R8) || \
|
defined(TARGET_NUCLEO_L053R8) || \
|
||||||
defined(TARGET_NUCLEO_L152RE)
|
defined(TARGET_NUCLEO_L152RE)
|
||||||
#define PIN_IN PB_8
|
#define PIN_IN PB_8
|
||||||
#define PIN_OUT PC_6
|
#define PIN_OUT PC_7
|
||||||
|
|
||||||
#elif defined(TARGET_DISCO_F407VG)
|
#elif defined(TARGET_DISCO_F407VG)
|
||||||
#define PIN_OUT PC_12
|
#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")
|
print "HOST: MUT Target name '%s', expected '%s'... [%s]"% (micro_name, self.mbed.options.micro, "OK" if micro_cmp else "FAIL")
|
||||||
stdout.flush()
|
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
|
if result: # Hello World received
|
||||||
self.print_result('success')
|
self.print_result('success')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -21,6 +21,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
|
import uuid
|
||||||
import pprint
|
import pprint
|
||||||
import random
|
import random
|
||||||
import optparse
|
import optparse
|
||||||
|
@ -377,6 +378,7 @@ class SingleTestRunner(object):
|
||||||
MACROS.extend(LIBRARY_MAP[lib_id]['macros'])
|
MACROS.extend(LIBRARY_MAP[lib_id]['macros'])
|
||||||
MACROS.append('TEST_SUITE_TARGET_NAME="%s"'% target)
|
MACROS.append('TEST_SUITE_TARGET_NAME="%s"'% target)
|
||||||
MACROS.append('TEST_SUITE_TEST_ID="%s"'% test_id)
|
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
|
project_name = self.opts_firmware_global_name if self.opts_firmware_global_name else None
|
||||||
try:
|
try:
|
||||||
|
@ -386,7 +388,7 @@ class SingleTestRunner(object):
|
||||||
toolchain,
|
toolchain,
|
||||||
test.dependencies,
|
test.dependencies,
|
||||||
options=build_project_options,
|
options=build_project_options,
|
||||||
clean=clean_project_options ,
|
clean=clean_project_options,
|
||||||
verbose=self.opts_verbose,
|
verbose=self.opts_verbose,
|
||||||
name=project_name,
|
name=project_name,
|
||||||
macros=MACROS,
|
macros=MACROS,
|
||||||
|
|
Loading…
Reference in New Issue