Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
batsim
batsim
Commits
4b5810bf
Commit
4b5810bf
authored
Jan 09, 2017
by
Millian Poquet
Browse files
[exec1] bugfix: dependencies badly computed
parent
203c8f4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/experiments/execute_one_instance.py
View file @
4b5810bf
...
...
@@ -216,11 +216,13 @@ def check_variables(variables):
in_depth_values
=
find_all_values
(
variables
[
var_name
])
logger
.
debug
(
"in_depth_values of {}: {}"
.
format
(
var_name
,
in_depth_values
))
for
potential_dependency_name
in
variables
:
substr
=
'
${'
+
potential_dependency_name
r
=
re
.
compile
(
'.*\
${'
+
potential_dependency_name
+
'[\[}].*'
)
for
depth_value
in
in_depth_values
:
if
substr
in
depth_value
:
if
r
.
match
(
depth_value
)
:
dependencies
[
var_name
].
add
(
potential_dependency_name
)
logger
.
debug
(
'Dependencies : {}'
.
format
(
dependencies
))
# Let's sort the variables by ascending number of dependencies
ordered
=
[(
len
(
dependencies
[
var_name
]),
var_name
,
dependencies
[
var_name
])
for
var_name
in
dependencies
]
ordered
.
sort
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment