Files
hacking/integration-test/test.sh
Joe Gordon 3f3f2b4e37 Don't shallow clone from file:// in integration test
Shallow cloning ends up writing a temporary file in the source git repo,
but we may not have write access to it. So if the REPO_ROOT format is
file based do a full clone.

Change-Id: Ic03af1e55b41a97790de478563100247c37065ab
2015-05-12 16:24:44 -07:00

26 lines
490 B
Bash
Executable File

#!/bin/bash
# Usage: test.sh openstack keystone
# Note: you can clone from a local file with REPO_ROOT=file:////~/path/to/repo
set -x
set -e
REPO_ROOT=${REPO_ROOT:-git://git.openstack.org}
if [[ -z "$2" ]]; then
org=openstack
project=nova
else
org=$1
project=$2
fi
if [[ $REPO_ROOT == file://* ]]; then
git clone $REPO_ROOT/$org/$project
else
git clone $REPO_ROOT/$org/$project --depth=1
fi
cd $project
set +e
flake8 --select H --statistics
cd ..
rm -rf $project