*.egg-info
*.egg
dist
-build
+virtualenv
wheelhouse*
*.log
*.trs
ceph-detect-init/tests/test_all.py \
ceph-detect-init/tox.ini
-ceph-detect-init-all:
- cd $(srcdir)/ceph-detect-init ; python setup.py build
+ceph-detect-init-all: ceph-detect-init/virtualenv
+
+ceph-detect-init/virtualenv:
+ cd $(srcdir)/ceph-detect-init ; ../tools/setup-virtualenv.sh ; virtualenv/bin/python setup.py develop
ceph-detect-init-clean:
- cd $(srcdir)/ceph-detect-init ; python setup.py clean ; rm -fr wheelhouse .tox build .coverage *.egg-info
+ cd $(srcdir)/ceph-detect-init ; python setup.py clean ; rm -fr wheelhouse .tox virtualenv .coverage *.egg-info
ceph-detect-init-install-data:
cd $(srcdir)/ceph-detect-init ; \
#!/bin/bash
#
# Copyright (C) 2015 SUSE LINUX GmbH
-# Copyright (C) 2015 <contact@redhat.com>
+# Copyright (C) 2016 <contact@redhat.com>
#
# Author: Owen Synge <osynge@suse.com>
# Author: Loic Dachary <loic@dachary.org>
# run from the ceph-detect-init directory or from its parent
test -d ceph-detect-init && cd ceph-detect-init
-trap "rm -fr make-check" EXIT
-virtualenv make-check
-. make-check/bin/activate
-# older versions of pip will not install wrap_console scripts
-# when using wheel packages
-pip --log make-check/log.txt install --upgrade 'pip >= 6.1'
-if test -d wheelhouse ; then
- export NO_INDEX=--no-index
-fi
-pip --log make-check/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse --upgrade distribute
-pip --log make-check/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse 'tox >=1.9'
-tox > make-check/tox.out 2>&1
+source virtualenv/bin/activate
+tox > virtualenv/tox.out 2>&1
status=$?
-grep -v InterpreterNotFound < make-check/tox.out
+grep -v InterpreterNotFound < virtualenv/tox.out
exit $status
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '
export PATH=..:.:$PATH # make sure program from sources are prefered
+export PATH=../ceph-detect-init/virtualenv/bin:$PATH
+export PATH=virtualenv/bin:$PATH
DIR=test-ceph-disk
-if virtualenv virtualenv-$DIR && test -d ceph-detect-init ; then
- . virtualenv-$DIR/bin/activate
- (
- # older versions of pip will not install wrap_console scripts
- # when using wheel packages
- pip install --upgrade 'pip >= 6.1'
- if test -d ceph-detect-init/wheelhouse ; then
- wheelhouse="--no-index --use-wheel --find-links=ceph-detect-init/wheelhouse"
- fi
- pip --log virtualenv-$DIR/log.txt install $wheelhouse --editable ceph-detect-init
- )
-fi
: ${CEPH_DISK:=ceph-disk}
OSD_DATA=$DIR/osd
MON_ID=a
}
function test_no_path() {
- ( export PATH=..:${VIRTUAL_ENV}/bin:/usr/bin:/bin ; test_activate_dir ) || return 1
+ ( export PATH=../ceph-detect-init/virtualenv/bin:virtualenv/bin:..:/usr/bin:/bin ; test_activate_dir ) || return 1
}
function test_mark_init() {
tools/rados/PoolDump.h \
tools/cephfs/DataScan.h
+EXTRA_DIST += \
+ tools/setup-virtualenv.sh
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2016 <contact@redhat.com>
+#
+# Author: Loic Dachary <loic@dachary.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library Public License for more details.
+#
+
+rm -fr virtualenv
+virtualenv virtualenv
+. virtualenv/bin/activate
+# older versions of pip will not install wrap_console scripts
+# when using wheel packages
+pip --log virtualenv/log.txt install --upgrade 'pip >= 6.1'
+if test -d wheelhouse ; then
+ export NO_INDEX=--no-index
+fi
+pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse --upgrade distribute
+pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse 'tox >=1.9'
+if test -f requirements.txt ; then
+ pip --log virtualenv/log.txt install $NO_INDEX --use-wheel --find-links=file://$(pwd)/wheelhouse -r requirements.txt
+fi