Refactor scripts to run e2e tests

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-05-13 22:31:30 -04:00
parent 7be1dccea7
commit be2792c5f9
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
6 changed files with 68 additions and 129 deletions

View file

@ -119,7 +119,8 @@ def file_passes(filename, refs, regexs):
# if we don't match the reference at this point, fail
if ref != data:
print("Header in %s does not match reference, diff:" % filename, file=verbose_out)
print("Header in %s does not match reference, diff:" %
filename, file=verbose_out)
if args.verbose:
print(file=verbose_out)
for line in difflib.unified_diff(ref, data, 'reference', filename, lineterm=''):
@ -138,8 +139,6 @@ skipped_dirs = [
'.git',
"vendor",
"test/e2e/framework/framework.go",
"hack/boilerplate/test",
"test/e2e/dind-cluster-v1.11.sh"
]

View file

@ -19,7 +19,7 @@ set -o nounset
set -o pipefail
SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of