aboutsummaryrefslogtreecommitdiff
path: root/scripts/boot.py
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-05-06 17:10:16 +0200
committerKarel Kočí <cynerd@email.cz>2015-05-06 17:10:16 +0200
commitb9ff681e3ed5efc0f8f76ce75d89b2214a6e68c9 (patch)
tree124f397a5b42bca85cad84cb48a4e2b1a883818f /scripts/boot.py
parent86777e27fcb6870694cd166866a37360b7591f5f (diff)
downloadlinux-conf-perf-b9ff681e3ed5efc0f8f76ce75d89b2214a6e68c9.tar.gz
linux-conf-perf-b9ff681e3ed5efc0f8f76ce75d89b2214a6e68c9.tar.bz2
linux-conf-perf-b9ff681e3ed5efc0f8f76ce75d89b2214a6e68c9.zip
Separate initialisation
Initialisation now can be executed without loop it self.
Diffstat (limited to 'scripts/boot.py')
-rw-r--r--scripts/boot.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/scripts/boot.py b/scripts/boot.py
index c8c9bea..bff70d9 100644
--- a/scripts/boot.py
+++ b/scripts/boot.py
@@ -5,24 +5,14 @@ import shutil
import importlib
import utils
+import initialize
from conf import conf
from conf import sf
from exceptions import MissingFile
-def gen_nbscript():
- try:
- os.remove(sf(conf.nbscript))
- except OSError:
- pass
-
- with open(sf(conf.nbscript), 'w') as f:
- f.write('# generated novaboot script. Please don\'t edit.\n')
- f.write('load ' + sf(conf.linux_image) + ' console=ttyS0,115200\n')
- f.write('load ' + sf(conf.initram) + '\n')
-
def boot():
if not os.path.isfile((conf.nbscript)):
- gen_nbscript()
+ initialize.gen_nbscript()
try:
os.mkdir(sf(conf.output_folder))
except FileExistsError:
@@ -41,6 +31,8 @@ def boot():
if line.startswith('lcp-output: '):
output += line[12:]
print(output)
+
+ # TODO change
data = bench.stdoutput(output)
iteration = 0