Skip to content

Commit 86264a1

Browse files
committed
Workflow parser: Support also XML files without sleep workaround
1 parent 76335c2 commit 86264a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

DATA/tools/parse

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,19 +151,19 @@ for line in f:
151151
if os.system(command) != 0:
152152
print('Error running command', command)
153153
if 'GEN_TOPO_OOM_WORKAROUND' in os.environ and int(os.environ['GEN_TOPO_OOM_WORKAROUND']):
154-
command = 'sed -i \'s,^\( *.exe.*sleep [0-9.]*;\).*\(|[^|]*./exe.\)$,\\1 cat ' + filename + ' \\2,\' ' + filename_xml
154+
command = 'sed -i \'s,^\( *<exe reachable="true">\).*\(|[^|]*</exe>\)$,\\1 cat ' + filename + ' \\2,\' ' + filename_xml
155155
if 'GEN_TOPO_DDS_ASSETS' in os.environ and int(os.environ['GEN_TOPO_DDS_ASSETS']):
156156
command = 'sed -i \'s/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/\'"\'"\'/\&#39;/g\' ' + filename
157157
print('Running SED command', command)
158158
if os.system(command) != 0:
159159
print('Error running sed on JSON file')
160160
asset_name = 'dpl_json_' + wf[0] + '_' + str(i)
161161
command = 'sed -i ' + \
162-
'-e \'s,^\( *.exe.*sleep [0-9.]*;\).*\(|[^|]*./exe.\)$,\\1 cat ${DDS_LOCATION}/' + asset_name + '.asset \\2,\' ' + \
163-
'-e \'/^\( *.decltask name.*>$\)/a <assets><name>' + asset_name + '</name></assets>\' ' + \
164-
'-e \'/^\( *.topology name.*>$\)/a <asset name="' + asset_name + '" type="inline" visibility="global" value="\' ' + \
165-
'-e \'/^\( *.topology name.*>$\)/r ' + filename + '\' ' + \
166-
'-e \'/^\( *.topology name.*>$\)/a " />\' ' + \
162+
'-e \'s,^\( *<exe reachable="true">\).*\(|[^|]*</exe>\)$,\\1 cat ${DDS_LOCATION}/' + asset_name + '.asset \\2,\' ' + \
163+
'-e \'/^\( *<decltask name.*>$\)/a <assets><name>' + asset_name + '</name></assets>\' ' + \
164+
'-e \'/^\( *<topology name.*>$\)/a <asset name="' + asset_name + '" type="inline" visibility="global" value="\' ' + \
165+
'-e \'/^\( *<topology name.*>$\)/r ' + filename + '\' ' + \
166+
'-e \'/^\( *<topology name.*>$\)/a " />\' ' + \
167167
filename_xml
168168
print('Running SED command', command)
169169
if os.system(command) != 0:

0 commit comments

Comments
 (0)