aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf.py2
-rwxr-xr-xparse_script3
-rw-r--r--scripts/boot.py3
3 files changed, 6 insertions, 2 deletions
diff --git a/conf.py b/conf.py
index 2e50189..5702027 100644
--- a/conf.py
+++ b/conf.py
@@ -29,7 +29,7 @@ boot_command = ['./boot_script']
# parse_command
# Command to parse double value from boot output
-parse_command = ['echo', '0']
+parse_command = ['./parse_script']
# picosat_args
# Additional arguments passed to PicoSAT.
diff --git a/parse_script b/parse_script
new file mode 100755
index 0000000..868212c
--- /dev/null
+++ b/parse_script
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+cat $1 | grep -e "^! .* ok" | sed -n '2p' | awk '{print $17}'
diff --git a/scripts/boot.py b/scripts/boot.py
index 7ae30a9..2d1461a 100644
--- a/scripts/boot.py
+++ b/scripts/boot.py
@@ -29,7 +29,8 @@ def boot(config, to_database = True):
value = None
try:
- out = utils.callsubprocess('parse_command', conf.parse_command,
+ out = utils.callsubprocess('parse_command', conf.parse_command +
+ [os.path.join(conf.output_folder, config.cfile)],
conf.parse_output, True)
value = float(out[0])
except Exception as e: