diff options
author | Karel Kočí <kocikare@fel.cvut.cz> | 2015-08-11 19:19:30 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-08-12 10:22:55 +0200 |
commit | e4c7d71976be006f1edfaa5ee3ad7619c9a77bba (patch) | |
tree | 600d988d91a8a6bd7d0371f25fb68f8678b39095 | |
parent | 21195308311758b0725773e0a19d1e0edd176c8f (diff) | |
download | linux-conf-perf-e4c7d71976be006f1edfaa5ee3ad7619c9a77bba.tar.gz linux-conf-perf-e4c7d71976be006f1edfaa5ee3ad7619c9a77bba.tar.bz2 linux-conf-perf-e4c7d71976be006f1edfaa5ee3ad7619c9a77bba.zip |
Add parse_script
Parsing maximal value from first thread as result.
-rw-r--r-- | conf.py | 2 | ||||
-rwxr-xr-x | parse_script | 3 | ||||
-rw-r--r-- | scripts/boot.py | 3 |
3 files changed, 6 insertions, 2 deletions
@@ -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: |