Skip to content

Commit e1a094d

Browse files
committed
Minor tweaks to the previous commit
1 parent 909151d commit e1a094d

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

HACKING

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Hackers Guide
33

44
1. Setting up the environment
55
-----------------------------
6-
To start development, you can set-up/activate a virtual environment by using the
7-
following command:
6+
To start development, you can set-up/activate a virtual environment by using
7+
the following command:
88
source contrib/activate-dev-env [python2|python3]
99

1010
Note: Providing no arguments will attempt to use python2.
@@ -34,7 +34,7 @@ login there:
3434

3535
Note: Before running rw-functional tests, make sure you have logged using:
3636
python bugzilla-cli \
37-
--bugzilla="https://partner-bugzilla.redhat.com/xmlrpc.cgi" \
37+
--bugzilla=partner-bugzilla.redhat.com \
3838
--user=$USER login
3939

4040
3. pylint and pep8
@@ -43,7 +43,7 @@ To test for pylint or pep8 violations, you can run:
4343
python setup.py pylint
4444

4545
Note: This expects that you already have pylint and pep8 (installed when setting
46-
up virtualenv) isntalled.
46+
up virtualenv) installed.
4747

4848
4. Patch Submission
4949
-------------------

contrib/activate-dev-env

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Helper script to create (if required) and activate a virtual environment for
2-
# a specified PYTHON_BINARY (python|python2|python3) and install dependencies
1+
#!/usr/bin/env bash
2+
3+
# Helper script to create (if required) and activate a virtual environment for
4+
# a specified PYTHON_BINARY (python|python2|python3) and install dependencies
35
# required for testing and development.
46
#
57
# Usage: source $0 [PYTHON_BINARY]
@@ -26,17 +28,17 @@ function virtualize()
2628
{
2729
PROMPT=$(basename ${PYTHON_BIN})
2830
DIR_NAME="${DIR_PREFIX}-${PROMPT}"
29-
31+
3032
if [ ! -d ${DIR_NAME} ]; then
3133
echo "INFO: Creating virtualenv ${DIR_NAME}"
32-
${VIRTIALENV_CMD} -p $(which ${PYTHON_BIN}) --prompt "${PROMPT}" ${DIR_NAME}
34+
${VIRTIALENV_CMD} -p $(which ${PYTHON_BIN}) \
35+
--prompt "${PROMPT}" ${DIR_NAME}
3336
fi
3437

3538
if [ -d ${DIR_NAME} ]; then
36-
activate $DIR_NAME
37-
39+
activate $DIR_NAME || exit 1
3840
for REQ in $(find ./ -maxdepth 1 -type f -name "*requirements.txt"); do
39-
pip install -qr "${REQ}"
41+
pip install -qr "${REQ}" || exit 1
4042
done
4143
else
4244
echo >&2 "ERROR: Failed to activate virtualenv."

contrib/run-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ for BIN in python2 python3; do
1616
python setup.py test ${ARGS}
1717
echo "INFO: Tests completed for ${BIN}"
1818
else
19-
echo "INFO: ${BIN} not found, skipping tests."
19+
echo "INFO: ${BIN} not found, skipping tests."
2020
fi
2121
done

0 commit comments

Comments
 (0)