Add test script to verify tox targets run
We should be verifying that the tox target defined will run after generating a project. There's no reason a brand new cookiecutter repo should have failing tests. Change-Id: Id142abd2f510a8cbfb42d32fb3f169a63552b981
This commit is contained in:
parent
7a6836d522
commit
274640e97b
@ -10,7 +10,7 @@ tmp_dir="$1"
|
||||
out_dir="$tmp_dir/output"
|
||||
|
||||
# The templates are above the tools directory.
|
||||
template_dir=$(dirname $(dirname $0))
|
||||
template_dir=$(readlink -e $(dirname $(dirname $0)))
|
||||
|
||||
rm -rf $out_dir
|
||||
mkdir -p $out_dir
|
||||
|
21
tools/test_tox_targets.sh
Executable file
21
tools/test_tox_targets.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux -o pipefail
|
||||
|
||||
# Wrapper around test_template.sh that runs tox tests in the resulting
|
||||
# repo to verify that our out-of-the-box configuration is valid
|
||||
|
||||
tmp_dir=$(mktemp -d)
|
||||
trap "rm -rf $tmp_dir" EXIT
|
||||
|
||||
tools_dir="$(dirname $0)"
|
||||
project_dir="$tmp_dir/output/oslo.testing"
|
||||
|
||||
$tools_dir/test_template.sh "$tmp_dir"
|
||||
|
||||
cd $project_dir
|
||||
|
||||
# PBR requires a git repo for versioning
|
||||
git init .
|
||||
|
||||
tox -e pep8,py27,py36,py37,docs,lower-constraints,cover
|
Loading…
x
Reference in New Issue
Block a user