diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-12-11 15:07:17 -0500 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-12-11 15:07:17 -0500 |
| commit | 8e8bcf786654231916f85b45aa32a56dae222f71 (patch) | |
| tree | 61f6c6580a45d3a2b801b7ff25d282173bf23a59 /meta-openstack/recipes-devtools/python | |
| parent | 393b57ed6d6d7c79d400714aa3d6a81023e4c424 (diff) | |
| download | meta-cloud-services-8e8bcf786654231916f85b45aa32a56dae222f71.tar.gz | |
cinder: modify run_tests to respect --tools-dir
Since the "tools" subdir of cinder is only packaged and installed
in /etc/cinder, we need to use --tools-dir to point the test script
in the right direction. Unfortunately, run_tests.sh takes this arg
and ignores it. So we patch the script to actually respect the
directory.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder/0001-run_tests-respect-tools-dir.patch | 29 | ||||
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder_git.bb | 6 |
2 files changed, 34 insertions, 1 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/0001-run_tests-respect-tools-dir.patch b/meta-openstack/recipes-devtools/python/python-cinder/0001-run_tests-respect-tools-dir.patch new file mode 100644 index 0000000..02ee051 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-cinder/0001-run_tests-respect-tools-dir.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From cecd4285356bdfdb36161d24b9a3a47942643077 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 3 | Date: Wed, 11 Dec 2013 14:25:49 -0500 | ||
| 4 | Subject: [PATCH] run_tests: respect --tools-dir | ||
| 5 | |||
| 6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 7 | --- | ||
| 8 | run_tests.sh | 4 ++-- | ||
| 9 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/run_tests.sh b/run_tests.sh | ||
| 12 | index 726ff438a077..f4f4d48c8808 100755 | ||
| 13 | --- a/run_tests.sh | ||
| 14 | +++ b/run_tests.sh | ||
| 15 | @@ -146,9 +146,9 @@ function run_tests { | ||
| 16 | then | ||
| 17 | # subunit-2to1 is present, testr subunit stream should be in version 2 | ||
| 18 | # format. Convert to version one before colorizing. | ||
| 19 | - bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py" | ||
| 20 | + bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} $tool_path/tools/colorizer.py" | ||
| 21 | else | ||
| 22 | - bash -c "${wrapper} $TESTRTESTS | ${wrapper} tools/colorizer.py" | ||
| 23 | + bash -c "${wrapper} $TESTRTESTS | ${wrapper} $tool_path/tools/colorizer.py" | ||
| 24 | fi | ||
| 25 | RESULT=$? | ||
| 26 | set -e | ||
| 27 | -- | ||
| 28 | 1.7.10.4 | ||
| 29 | |||
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb index 50eacaa..c441828 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb | |||
| @@ -11,6 +11,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ | |||
| 11 | file://cinder.conf \ | 11 | file://cinder.conf \ |
| 12 | file://cinder.init \ | 12 | file://cinder.init \ |
| 13 | file://cinder-volume \ | 13 | file://cinder-volume \ |
| 14 | file://0001-run_tests-respect-tools-dir.patch \ | ||
| 14 | " | 15 | " |
| 15 | 16 | ||
| 16 | SRCREV="1f99a044580286bf0d927cc7fc7ce3378653aef0" | 17 | SRCREV="1f99a044580286bf0d927cc7fc7ce3378653aef0" |
| @@ -48,7 +49,9 @@ do_install_append() { | |||
| 48 | install -m 0755 ${WORKDIR}/cinder-volume ${D}${sysconfdir}/init.d/cinder-volume | 49 | install -m 0755 ${WORKDIR}/cinder-volume ${D}${sysconfdir}/init.d/cinder-volume |
| 49 | fi | 50 | fi |
| 50 | 51 | ||
| 52 | # test setup | ||
| 51 | cp run_tests.sh ${CINDER_CONF_DIR} | 53 | cp run_tests.sh ${CINDER_CONF_DIR} |
| 54 | cp -r tools ${CINDER_CONF_DIR} | ||
| 52 | } | 55 | } |
| 53 | 56 | ||
| 54 | pkg_postinst_${SRCNAME}-setup () { | 57 | pkg_postinst_${SRCNAME}-setup () { |
| @@ -75,7 +78,8 @@ ALLOW_EMPTY_${SRCNAME}-setup = "1" | |||
| 75 | 78 | ||
| 76 | FILES_${PN} = "${libdir}/*" | 79 | FILES_${PN} = "${libdir}/*" |
| 77 | 80 | ||
| 78 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh" | 81 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/run_tests.sh \ |
| 82 | ${sysconfdir}/${SRCNAME}/tools" | ||
| 79 | 83 | ||
| 80 | FILES_${SRCNAME}-api = "${bindir}/cinder-api \ | 84 | FILES_${SRCNAME}-api = "${bindir}/cinder-api \ |
| 81 | ${sysconfdir}/init.d/cinder-api" | 85 | ${sysconfdir}/init.d/cinder-api" |
