Skip to content

Commit cad3066

Browse files
author
Arthur Chan
committed
Fix problem
1 parent 086d2ad commit cad3066

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

startTool/startOpus.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,19 @@
2525
os.chdir(workingPath)
2626

2727
#Get Audit Log
28-
29-
#Capture Provenance
30-
subprocess.call((baseCommand % ('process launch %s/test' % stagePath)).split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
31-
subprocess.call('trace-cmd stop'.split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
32-
subprocess.call(('trace-cmd extract -o %s/trace.dat' % workingPath).split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
33-
=======
3428
#Config OPUS Server
3529
pipe = subprocess.Popen(['%s/bin/opusctl' % opusPath, 'conf'], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
3630

3731
#Choose a location for the OPUS master config
3832
config = '%s/.opus-cfg\n' % workingPath
3933
#Where is your OPUS installation?
40-
config = '%s%s/\n' % (config,opusPath)
34+
config = '%s%s/\n' % (config, opusPath)
4135
#Choose an address for provenance data collection.
4236
config = '%s\n' % config
4337
#Choose a location for the OPUS database to reside in
44-
config = '%s%s/output.db\n' % (config,workingPath)
38+
config = '%s%s/output.db\n' % (config, workingPath)
4539
#Choose a location for the OPUS bash variables cfg_file
46-
config = '%s%s/.opus-vars\n' % (config,workingPath)
40+
config = '%s%s/.opus-vars\n' % (config, workingPath)
4741
#What is the location of your python 2.7 binary?
4842
config = '%s\n' % config
4943
#Where is your jvm installation?
@@ -55,7 +49,8 @@
5549

5650
pipe.communicate(input=config.encode())
5751

58-
baseCommand = '%s/bin/opusctl --conf %s/.opus-cfg %s' % (opusPath,workingPath,'%s')
52+
baseCommand = '%s/bin/opusctl --conf %s/.opus-cfg %s' % (opusPath, workingPath, '%s')
53+
5954
#Start Opus Server
6055
subprocess.call((baseCommand % 'server start').split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
6156

@@ -66,11 +61,11 @@
6661
subprocess.call('trace-cmd start -e syscalls'.split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
6762

6863
#Capture Provenance
69-
subprocess.call((baseCommand % ('process launch %s/%s' % (stagePath,progName))).split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
70-
64+
subprocess.call((baseCommand % ('process launch %s/%s' % (stagePath, progName))).split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
65+
7166
subprocess.call('trace-cmd stop'.split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
7267
subprocess.call(('trace-cmd extract -o %s/trace.dat' % workingPath).split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
73-
68+
7469
#Stop Opus Server
7570
subprocess.call((baseCommand % 'server stop').split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
7671

@@ -97,6 +92,6 @@
9792
os.makedirs('%s/%s-%s' %(workingPath, suffix.split('-')[0], fingerprint))
9893
os.chown('%s/%s-%s' %(workingPath, suffix.split('-')[0], fingerprint), 1000, 1000)
9994

100-
os.rename('%s/output.db' % workingPath,'%s/%s-%s/output.db-%s-%d' % (workingPath, suffix.split('-')[0], fingerprint, suffix, i))
95+
os.rename('%s/output.db' % workingPath, '%s/%s-%s/output.db-%s' % (workingPath, suffix.split('-')[0], fingerprint, suffix))
10196

10297
print(fingerprint)

startTool/startSpade.py

100755100644
File mode changed.

0 commit comments

Comments
 (0)