Review: Update example_lib.py to use rmtree rather than rm system call.

Update examples.json to limit TLS examples to a couple of boards and only
GCC_ARM and ARM compilers.
pull/3048/head
Anna Bridge 2016-10-18 12:30:19 +01:00
parent bbfa954839
commit 36964561b9
2 changed files with 4 additions and 3 deletions

View File

@ -21,8 +21,8 @@
"https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-tls-authcrypt"
],
"features" : [],
"targets" : [],
"toolchains" : [],
"targets" : ["K64F", "NUCLEO_F429ZI"],
"toolchains" : ["GCC_ARM", "ARM"],
"auto-update" : true
},
{

View File

@ -9,6 +9,7 @@ from os.path import dirname, abspath, basename
import os.path
import sys
import subprocess
from shutil import rmtree
ROOT = abspath(dirname(dirname(dirname(dirname(__file__)))))
sys.path.insert(0, ROOT)
@ -116,7 +117,7 @@ def source_repos(config):
name = basename(repo)
if os.path.exists(name):
print("'%s' example directory already exists. Deleting..." % name)
subprocess.call(['rm', '-rf', name])
rmtree(name)
subprocess.call(["mbed-cli", "import", repo])