From 76d164b1ba3a074f3dde20e643eec9e3021f684f Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 14 Aug 2015 12:29:32 -0400 Subject: [PATCH] Create an os-testr venv for running subunit2html This commit creates a venv for installing os-testr which will enable all test jobs to have access to the subunit2html utility which has been moved to live inside the os-testr package instead of as a slave script. Change-Id: I2050b54eb2def10438764f3eeb55ecf9caa874dc --- .../nodepool-base/install.d/91-venv-os-testr | 19 +++++++++++++++++++ nodepool/scripts/prepare_node.sh | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100755 nodepool/elements/nodepool-base/install.d/91-venv-os-testr diff --git a/nodepool/elements/nodepool-base/install.d/91-venv-os-testr b/nodepool/elements/nodepool-base/install.d/91-venv-os-testr new file mode 100755 index 0000000000..31b2d77858 --- /dev/null +++ b/nodepool/elements/nodepool-base/install.d/91-venv-os-testr @@ -0,0 +1,19 @@ +#!/bin/bash -xe +# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. + +# Create a virtualenv for os-testr (which contains subunit2html) +# This is in /usr instead of /usr/local due to this bug on precise: +# https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588 +sudo -H virtualenv /usr/os-testr-env +sudo -H /usr/os-testr-env/bin/pip install os-testr diff --git a/nodepool/scripts/prepare_node.sh b/nodepool/scripts/prepare_node.sh index b5418dccb5..46892a2245 100755 --- a/nodepool/scripts/prepare_node.sh +++ b/nodepool/scripts/prepare_node.sh @@ -246,5 +246,11 @@ sudo -H virtualenv /usr/zuul-swift-logs-env sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic argparse \ requests glob2 +# Create a virtualenv for os-testr (which contains subunit2html) +# this is in /usr instead of /usr/loca/ due to this bug on precise: +# https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588 +sudo -H virtualenv /usr/os-testr-env +sudo -H /usr/os-testr-env/bin/pip install os-testr + sync sleep 5