From 4c49c81008fc2f22c2eef2e019a11f80cd5464a8 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 21 Aug 2024 11:00:48 +0200 Subject: Add test verifying lint information is propagated properly ... through all our various rules and forms of libraries. --- tests/test_cases/deps/lint/expect.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tests/test_cases/deps/lint/expect.py (limited to 'tests/test_cases/deps/lint/expect.py') diff --git a/tests/test_cases/deps/lint/expect.py b/tests/test_cases/deps/lint/expect.py new file mode 100755 index 0000000..d26343d --- /dev/null +++ b/tests/test_cases/deps/lint/expect.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 + +import json +import os +import sys + +with open(sys.argv[1]) as f: + invocations = json.load(f) + +expected = set(sys.argv[2:]) +found = set() + +for name, cmd in invocations.items(): + print("- %s compiled as %r" % (name, cmd)) + found.add(os.path.basename(name)) + +if expected != found: + print() + print("Found: %r" % (found,)) + print("missing:%r" % (expected - found,)) + print("unexpected: %r" % (found - expected,)) + sys.exit(1) +else: + print("OK") -- cgit v1.2.3