Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test-and-profiling
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
stm32
test-and-profiling
Commits
f13eec06
Commit
f13eec06
authored
11 years ago
by
Enrico Joerns
Browse files
Options
Downloads
Patches
Plain Diff
tools/profiling: support for suite_config.yaml in log files.
Added braces to highlight test and device names in log output.
parent
eb5c503b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/Testsuite.py
+10
-6
10 additions, 6 deletions
test/Testsuite.py
with
10 additions
and
6 deletions
test/Testsuite.py
+
10
−
6
View file @
f13eec06
...
...
@@ -18,9 +18,9 @@ from helper import *
class
Testsuite
(
object
):
def
__init__
(
self
,
suitecfg
,
devcfg
,
testcfg
,
options
):
def
__init__
(
self
,
suitecfg
,
devcfg
,
testcfg
,
options
):
self
.
config
=
suitecfg
self
.
devcfg
=
devcfg
self
.
devcfg
=
devcfg
# Set PATH to contain inga_tool and profile-neat.py
path_inga_tool_dir
=
os
.
path
.
join
(
self
.
config
[
'
contikibase
'
],
"
tools
"
,
"
inga
"
,
"
inga_tool
"
)
path_profile_neat_py_dir
=
os
.
path
.
join
(
self
.
config
[
'
contikibase
'
],
"
tools
"
,
"
profiling
"
)
...
...
@@ -60,8 +60,12 @@ class Testsuite(object):
verfile
.
write
(
self
.
contikiversion
)
verfile
.
write
(
'
\n
'
)
# Save a copy of current configuration to log dir
shutil
.
copyfile
(
options
.
node_configfile
,
os
.
path
.
join
(
self
.
logdir
,
'
node_config.yaml
'
))
shutil
.
copyfile
(
options
.
test_configfile
,
os
.
path
.
join
(
self
.
logdir
,
'
test_config.yaml
'
))
try
:
shutil
.
copyfile
(
options
.
suite_configfile
,
os
.
path
.
join
(
self
.
logdir
,
'
suite_config.yaml
'
))
except
IOError
:
shutil
.
copyfile
(
options
.
test_configfile
,
os
.
path
.
join
(
self
.
logdir
,
'
test_config.yaml
'
))
# create symlink to logdir
try
:
...
...
@@ -102,7 +106,7 @@ class Testsuite(object):
testcfg
[
'
logbase
'
]
=
self
.
logdir
testcfg
[
'
contikibase
'
]
=
self
.
config
[
'
contikibase
'
]
#if testcfg['name'] in self.config['testcases']:
testcase
=
Testcase
(
testcfg
,
self
.
devices
,
testcfg
[
'
devices
'
],
devcfg
,
options
)
testcase
=
Testcase
(
testcfg
,
self
.
devices
,
testcfg
[
'
devices
'
],
devcfg
,
options
)
self
.
tests
[
testcfg
[
'
name
'
]]
=
testcase
...
...
@@ -116,9 +120,9 @@ class Testsuite(object):
device
.
platform
,
device
.
path
)
logging
.
info
(
"
The following tests are defined:
"
)
for
test
in
self
.
tests
.
values
():
logging
.
info
(
"
* %s with devices:
"
,
test
.
name
)
logging
.
info
(
"
*
[
%s
]
with devices:
"
,
test
.
name
)
for
device
in
test
.
devices
:
logging
.
info
(
"
* %s configured with program %s
"
,
device
.
name
,
logging
.
info
(
"
*
[
%s
]
configured with program %s
"
,
device
.
name
,
os
.
path
.
join
(
device
.
programdir
,
device
.
program
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment