diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-03-23 15:48:45 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-03-23 15:48:45 -0300 |
commit | d61b460be39763f339f3b7c42614653fc0120346 (patch) | |
tree | d70d426623233d19a1c18498ed0bdda954277bc5 | |
parent | 4e9bb712c65fc50d068423bbf2a1baa65486914f (diff) | |
download | tuna-d61b460be39763f339f3b7c42614653fc0120346.tar.gz |
testuna: We should check if the version reported matches the rpm version
Duh, I missed this one for 0.8.4, but never again! :)
Reported-by: David Sommerseth <davids@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | setup.py | 2 | ||||
-rwxr-xr-x | testuna | 10 | ||||
-rwxr-xr-x | tuna-cmd.py | 2 |
3 files changed, 12 insertions, 2 deletions
@@ -12,7 +12,7 @@ if isfile("MANIFEST"): PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages') setup(name="tuna", - version = "0.8.3", + version = "0.8.4", description = "Application tuning GUI", author = "Arnaldo Carvalho de Melo", author_email = "acme@redhat.com", @@ -81,6 +81,11 @@ die_if_not_equal() { [ $1 -ne $2 ] && die 'FAILED!' "$3" } +die_if_not_str_equal() { + dprint "$3" + [ $1 != $2 ] && die 'FAILED!' "$3" +} + TESTUNA_DIR=$(mktemp -d -t testuna.XXXXXX) || exit 1 INITIAL=$TESTUNA_DIR/initial.tuna INITIAL_INIT_AFFINITY=$(get_affinity 1) @@ -93,6 +98,11 @@ dprint "Saving initial configuration" tuna_save $INITIAL +TUNA_RPM_VERSION=$(rpm -q --qf "%{version}\n" tuna) +TUNA_BIN_VERSION=$(tuna --version) +die_if_not_str_equal "$TUNA_RPM_VERSION" "$TUNA_BIN_VERSION" \ + "Verifying --version ($TUNA_BIN_VERSION) matches package version ($TUNA_RPM_VERSION)" + rtctl --file $INITIAL reset die_if_conf_changed "Replaying initial config" diff --git a/tuna-cmd.py b/tuna-cmd.py index 8449809..5685cb1 100755 --- a/tuna-cmd.py +++ b/tuna-cmd.py @@ -28,7 +28,7 @@ except: nr_cpus = None ps = None irqs = None -version = "0.8.3" +version = "0.8.4" def usage(): print '''Usage: tuna [OPTIONS] |