Skip to content

Commit 87a978c

Browse files
committed
Move private_settings.py to root mbed_settings.py. Various updates to reflect the path changes
1 parent 5e6722d commit 87a978c

15 files changed

+32
-32
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dist
77
MANIFEST
88

99
# Private settings
10-
private_settings.py
10+
mbed_settings.py
1111

1212
# Default Build Directory
1313
.build/

docs/BUILDING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ Workspace tools are set of Python scripts used off-line by Mbed SDK team to:
153153
Before we can run our first test we need to configure our test environment a little!
154154
Now we need to tell workspace tools where our compilers are.
155155

156-
* Please to go ```mbed/tools/``` directory and create empty file called ```private_settings.py```.
156+
* Please to go ```mbed``` directory and create empty file called ```mbed_settings.py```.
157157
```
158-
$ touch private_settings.py
158+
$ touch mbed_settings.py
159159
```
160160
* Populate this file the Python code below:
161161
```python
@@ -203,10 +203,10 @@ GCC_CR_PATH = "C:/Work/toolchains/LPCXpresso_6.1.4_194/lpcxpresso/tools/bin"
203203
IAR_PATH = "C:/Work/toolchains/iar_6_5/arm"
204204
```
205205

206-
Note: Settings in ```private_settings.py``` will overwrite variables with default values in ```mbed/tools/settings.py``` file.
206+
Note: Settings in ```mbed_settings.py``` will overwrite variables with default values in ```mbed/default_settings.py``` file.
207207

208208
## Build Mbed SDK library from sources
209-
Let's build mbed SDK library off-line from sources using your compiler. We've already cloned mbed SDK sources, we've also installed compilers and added their paths to ```private_settings.py```.
209+
Let's build mbed SDK library off-line from sources using your compiler. We've already cloned mbed SDK sources, we've also installed compilers and added their paths to ```mbed_settings.py```.
210210
We now should be ready to use workspace tools script ```build.py``` to compile and build mbed SDK from sources.
211211

212212
We are still using console. You should be already in ```mbed/tools/``` directory if not go to ```mbed/tools/``` and type below command:

docs/TESTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ $ git clone https://github.com/mbedmicro/mbed.git
492492
$ hg clone https://mbed.org/users/rgrover1/code/cpputest/
493493
```
494494

495-
After above three steps you should have proper directory structure. All you need to do now is to configure your ```private_settings.py``` in ```mbed/tools/``` directory. Please refer to mbed SDK build script documentation for details.
495+
After above three steps you should have proper directory structure. All you need to do now is to configure your ```mbed_settings.py``` in ```mbed``` directory. Please refer to mbed SDK build script documentation for details.
496496

497497
## CppUTest with mbed port
498498
To make sure you actualy have CppUTest library with mbed SDK port you can go to CppUTest ```armcc``` platform directory:

setup.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
OWNER_NAMES = 'emilmont, bogdanm'
1717
1818

19-
# If private_settings.py exists in tools, read it in a temporary file
19+
# If mbed_settings.py exists in tools, read it in a temporary file
2020
# so it can be restored later
21-
private_settings = join('tools', 'private_settings.py')
21+
mbed_settings = join('mbed_settings.py')
2222
backup = None
23-
if isfile(private_settings):
23+
if isfile(mbed_settings):
2424
backup = TemporaryFile()
25-
with open(private_settings, "rb") as f:
25+
with open(mbed_settings, "rb") as f:
2626
copyfileobj(f, backup)
2727

28-
# Create the correct private_settings.py for the distribution
29-
with open(private_settings, "wt") as f:
28+
# Create the correct mbed_settings.py for the distribution
29+
with open(mbed_settings, "wt") as f:
3030
f.write("from mbed_settings import *\n")
3131

3232
setup(name='mbed-tools',
@@ -42,8 +42,8 @@
4242
license=LICENSE,
4343
install_requires=["PrettyTable>=0.7.2", "PySerial>=2.7", "IntelHex>=1.3", "colorama>=0.3.3", "Jinja2>=2.7.3", "project-generator>=0.8.11,<0.9.0", "junit-xml", "requests", "pyYAML"])
4444

45-
# Restore previous private_settings if needed
45+
# Restore previous mbed_settings if needed
4646
if backup:
4747
backup.seek(0)
48-
with open(private_settings, "wb") as f:
48+
with open(mbed_settings, "wb") as f:
4949
copyfileobj(backup, f)

tools/buildbot/master.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,20 +286,20 @@ from buildbot.config import BuilderConfig
286286

287287
c['builders'] = []
288288

289-
copy_private_settings = ShellCommand(name = "copy private_settings.py",
290-
command = "cp ../private_settings.py tools/private_settings.py",
289+
copy_mbed_settings = ShellCommand(name = "copy mbed_settings.py",
290+
command = "cp ../mbed_settings.py mbed_settings.py",
291291
haltOnFailure = True,
292-
description = "Copy private_settings.py")
292+
description = "Copy mbed_settings.py")
293293

294294
mbed_build_release = BuildFactory()
295295
mbed_build_release.addStep(git_clone)
296-
mbed_build_release.addStep(copy_private_settings)
296+
mbed_build_release.addStep(copy_mbed_settings)
297297

298298
for target_name, toolchains in OFFICIAL_MBED_LIBRARY_BUILD:
299299
builder_name = "All_TC_%s" % target_name
300300
mbed_build = BuildFactory()
301301
mbed_build.addStep(git_clone)
302-
mbed_build.addStep(copy_private_settings)
302+
mbed_build.addStep(copy_mbed_settings)
303303
# Adding all chains for target
304304
for toolchain in toolchains:
305305
build_py = BuildCommand(name = "Build %s using %s" % (target_name, toolchain),

tools/host_tests/tcpecho_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import string, random
1919
from time import time
2020

21-
from private_settings import SERVER_ADDRESS
21+
from mbed_settings import SERVER_ADDRESS
2222

2323
ECHO_PORT = 7
2424

tools/host_tests/tcpecho_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from SocketServer import BaseRequestHandler, TCPServer
1818
from time import time
1919

20-
from private_settings import LOCALHOST
20+
from mbed_settings import LOCALHOST
2121

2222
MAX_INDEX = 126
2323
MEGA = float(1024 * 1024)

tools/host_tests/tcpecho_server_loop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
ROOT = abspath(join(dirname(__file__), "..", ".."))
2121
sys.path.insert(0, ROOT)
2222

23-
from tools.private_settings import LOCALHOST
23+
from mbed_settings import LOCALHOST
2424
from SocketServer import BaseRequestHandler, TCPServer
2525

2626

tools/host_tests/udpecho_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import string, random
1919
from time import time
2020

21-
from private_settings import CLIENT_ADDRESS
21+
from mbed_settings import CLIENT_ADDRESS
2222

2323
ECHO_PORT = 7
2424

tools/host_tests/udpecho_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
limitations under the License.
1616
"""
1717
from SocketServer import BaseRequestHandler, UDPServer
18-
from private_settings import SERVER_ADDRESS
18+
from mbed_settings import SERVER_ADDRESS
1919

2020
class UDP_EchoHandler(BaseRequestHandler):
2121
def handle(self):

tools/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from tools.options import get_default_options_parser
4343
from tools.build_api import build_project
4444
try:
45-
import tools.private_settings as ps
45+
import mbed_settings as ps
4646
except:
4747
ps = object()
4848

tools/project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from tools.libraries import LIBRARIES
1616

1717
try:
18-
import tools.private_settings as ps
18+
import mbed_settings as ps
1919
except:
2020
ps = object()
2121

@@ -132,7 +132,7 @@
132132
args_error(parser, "[ERROR] specify either '-n' or '-p', not both")
133133
if n:
134134
if not n in TEST_MAP.keys():
135-
# Check if there is an alias for this in private_settings.py
135+
# Check if there is an alias for this in mbed_settings.py
136136
if getattr(ps, "test_alias", None) is not None:
137137
alias = ps.test_alias.get(n, "")
138138
if not alias in TEST_MAP.keys():

tools/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ROOT = abspath(join(dirname(__file__), ".."))
1919

2020
# These default settings have two purposes:
21-
# 1) Give a template for writing local "private_settings.py"
21+
# 1) Give a template for writing local "mbed_settings.py"
2222
# 2) Give default initialization fields for the "toolchains.py" constructors
2323

2424
##############################################################################
@@ -59,7 +59,7 @@
5959
# IAR
6060
IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.3/arm"
6161

62-
# Goanna static analyser. Please overload it in private_settings.py
62+
# Goanna static analyser. Please overload it in mbed_settings.py
6363
GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin"
6464

6565
# cppcheck path (command) and output message format

tools/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,7 +1732,7 @@ def get_default_test_options_parser():
17321732
parser.add_option('-M', '--MUTS',
17331733
dest='muts_spec_filename',
17341734
metavar="FILE",
1735-
help='Points to file with MUTs specification (overwrites settings.py and private_settings.py)')
1735+
help='Points to file with MUTs specification (overwrites settings.py and mbed_settings.py)')
17361736

17371737
parser.add_option("-j", "--jobs",
17381738
dest='jobs',

tools/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,10 +1142,10 @@
11421142
GROUPS["rtos"] = [test["id"] for test in TESTS if test["id"].startswith("RTOS_")]
11431143
GROUPS["net"] = [test["id"] for test in TESTS if test["id"].startswith("NET_")]
11441144
GROUPS["automated"] = [test["id"] for test in TESTS if test.get("automated", False)]
1145-
# Look for 'TEST_GROUPS' in private_settings.py and update the GROUPS dictionary
1145+
# Look for 'TEST_GROUPS' in mbed_settings.py and update the GROUPS dictionary
11461146
# with the information in test_groups if found
11471147
try:
1148-
from tools.private_settings import TEST_GROUPS
1148+
from mbed_settings import TEST_GROUPS
11491149
except:
11501150
TEST_GROUPS = {}
11511151
GROUPS.update(TEST_GROUPS)

0 commit comments

Comments
 (0)