summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-03-23 15:48:45 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2009-03-23 15:48:45 -0300
commitd61b460be39763f339f3b7c42614653fc0120346 (patch)
treed70d426623233d19a1c18498ed0bdda954277bc5
parent4e9bb712c65fc50d068423bbf2a1baa65486914f (diff)
downloadtuna-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-xsetup.py2
-rwxr-xr-xtestuna10
-rwxr-xr-xtuna-cmd.py2
3 files changed, 12 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 0bea6f1..f80c40e 100755
--- a/setup.py
+++ b/setup.py
@@ -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",
diff --git a/testuna b/testuna
index e694fec..f67ff67 100755
--- a/testuna
+++ b/testuna
@@ -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]