otherwise report an error
Message-ID: <5c6a9c19.cNyhjfxF/HwYiaV9%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 64bdcf6553f04b0be1da923cd94036c96fbff568
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=64bdcf6553f04b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 15 22:31:05 2019 +0100
mypy helper: Ensure the .venv and mypy commmand exists, otherwise report an error
Change-Id: If67a959c17a6c580b01cca8e35e8b01105440eab
---
tests/static/run_mypy | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/static/run_mypy b/tests/static/run_mypy
index 42cb3a6..474f9ef 100755
--- a/tests/static/run_mypy
+++ b/tests/static/run_mypy
@@ -1,5 +1,14 @@
-#! /bin/sh
+#!/bin/sh
# mypy_path in mypy.ini doesn't support relative paths, so we need this wrapper...
:-/
cd $(dirname $0)
+
+make --silent .venv
+
+if [ ! -f ./.venv/bin/mypy ]; then
+ for LAST_ARG; do :; done
+ echo "$LAST_ARG:1: error: Could not find ./.venv/bin/mypy"
+ exit 1
+fi
+
REPO_PATH=$(realpath ../..)
MYPYPATH=$REPO_PATH:$REPO_PATH/livestatus/api/python:$REPO_PATH/omd/packages/omd:$REPO_PATH/tests:$(realpath
typeshed) exec ./.venv/bin/mypy "$@"