From 8cf6e680f459dd984dd3e713a2d98d065292dcaf Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Thu, 18 Sep 2014 23:50:36 -0400 Subject: [PATCH] Remove projects_alphabetized from tox.ini Since the split to project-config, there is no longer a need to run 'tox' for projects_alphabetized, since those resources no longer exist. Also removing the shell scripts that were running the tests. Change-Id: Ib7a762d872da9c5d945206807c405e7452b49638 --- tools/check_projects_yaml_alphabetized.sh | 24 ------------ tools/check_upstream_url_scheme.py | 45 ----------------------- tox.ini | 15 +------- 3 files changed, 1 insertion(+), 83 deletions(-) delete mode 100755 tools/check_projects_yaml_alphabetized.sh delete mode 100755 tools/check_upstream_url_scheme.py diff --git a/tools/check_projects_yaml_alphabetized.sh b/tools/check_projects_yaml_alphabetized.sh deleted file mode 100755 index 87beb69598..0000000000 --- a/tools/check_projects_yaml_alphabetized.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -xe - -# It checks that projects.yaml alphabetized and prints list of projects that -# should be sorted. - -export TMPDIR=`/bin/mktemp -d` -trap "rm -rf $TMPDIR" EXIT - -pushd $TMPDIR -PROJECTS_LIST=$OLDPWD/modules/openstack_project/files/review.projects.yaml - -sed -e '/^- project: /!d' -e 's/^- project: //' $PROJECTS_LIST > projects_list - -LC_ALL=C sort --ignore-case projects_list -o projects_list.sorted - -if ! diff projects_list projects_list.sorted > projects_list.diff; then - echo "The following projects should be alphabetized: " - cat projects_list.diff | grep -e '> ' - exit 1 -else - echo "Projects alphabetized." -fi - -popd diff --git a/tools/check_upstream_url_scheme.py b/tools/check_upstream_url_scheme.py deleted file mode 100755 index 7ee54a6a15..0000000000 --- a/tools/check_upstream_url_scheme.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -""" -Allow git:// and https:// URLs for importing upstream repositories, -but not git@ -""" - -import argparse - -import yaml - - -parser = argparse.ArgumentParser() -parser.add_argument('-v', '--verbose', - dest='verbose', - default=False, - action='store_true', - ) -parser.add_argument( - 'infile', - help='path to review.projects.yaml', -) -args = parser.parse_args() - -projects = yaml.load(open(args.infile, 'r')) - -VALID_SCHEMES = ['https://', 'http://', 'git://'] - -for p in projects: - name = p.get('project') - if not name: - # not a project - continue - upstream = p.get('upstream') - if args.verbose: - print 'Checking %s: %r' % (name, upstream) - if not upstream: - continue - for prefix in VALID_SCHEMES: - if upstream.startswith(prefix): - break - else: - raise ValueError( - 'Upstream URLs should use a scheme in %s, found %s' % - (VALID_SCHEMES, p['project']) - ) diff --git a/tox.ini b/tox.ini index 7ec8d20810..1d209cbf4a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = pep8,upstream,projects_alphabetized +envlist = pep8,upstream skipsdist = True [testenv] @@ -11,12 +11,6 @@ deps = -r{toxinidir}/test-requirements.txt [testenv:pep8] commands = flake8 -[testenv:projects] -deps = PyYAML -commands = - {toxinidir}/tools/check_upstream_url_scheme.py modules/openstack_project/files/review.projects.yaml - {toxinidir}/tools/check_projects_yaml_alphabetized.sh - [testenv:venv] commands = {posargs} @@ -42,12 +36,5 @@ commands = mkdir -p {envdir}/tmp jenkins-jobs -l debug test -o {envdir}/tmp modules/openstack_project/files/jenkins_job_builder/config -[testenv:zuul] -basepython = python2.7 -deps = -commands = - {toxinidir}/tools/check_projects_yaml_alphabetized.sh - {toxinidir}/tools/run-layout.sh openstack-infra config - [testenv:bashate] commands = bashate -v