aboutsummaryrefslogtreecommitdiff
path: root/scripts/phase.py
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-04-28 14:08:59 +0200
committerKarel Kočí <cynerd@email.cz>2015-04-28 14:08:59 +0200
commit4761eed66e66b7227087095f41fbfa7d235f64c9 (patch)
tree05f286a48f2108a5f6ef231517a8c72dac4b0156 /scripts/phase.py
parent0baad1442c327f4376d3666b6b6cae77c544d4d2 (diff)
downloadlinux-conf-perf-4761eed66e66b7227087095f41fbfa7d235f64c9.tar.gz
linux-conf-perf-4761eed66e66b7227087095f41fbfa7d235f64c9.tar.bz2
linux-conf-perf-4761eed66e66b7227087095f41fbfa7d235f64c9.zip
Include iteration and phase code to loop
Diffstat (limited to 'scripts/phase.py')
-rw-r--r--scripts/phase.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/scripts/phase.py b/scripts/phase.py
deleted file mode 100644
index 30e61c2..0000000
--- a/scripts/phase.py
+++ /dev/null
@@ -1,44 +0,0 @@
-import os
-import sys
-
-from conf import conf
-from conf import sf
-
-phases = ("Not Initialized", #0
- "Initializing", #1
- "Initialized", #2
- "Solution generating", #3
- "Solution generated", #4
- "Solution applying", #5
- "Solution applied", #6
- "Kernel configuration", #7
- "Kernel configured", #8
- "Kernel build", #9
- "Kernel built", #10
- "System boot", #11
- "Benchmark successful" #12
- )
-
-def get():
- try:
- with open(sf(conf.phase_file)) as f:
- txtPhase = f.readline().rstrip()
- if not txtPhase in phases:
- raise PhaseMismatch()
- return phases.index(txtPhase)
- except FileNotFoundError:
- return 0
-
-def set(phs):
- with open(sf(conf.phase_file), 'w') as f:
- f.write(phases[phs])
-
-def pset(str):
- set(phase.index(str))
-
-def phs(str):
- return phases.index(str)
-
-def message(phs):
- "Prints message signaling running phase."
- print("-- " + phases[phs])