summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/cruft/cruft-python
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
commit75808db17caf8b960b351e3408e74142f4c85aac (patch)
tree7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/cruft/cruft-python
parentInitial commit. (diff)
downloadlintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz
lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/cruft/cruft-python')
-rw-r--r--t/recipes/checks/cruft/cruft-python/build-spec/debian/missing-sources/fake.py1
-rw-r--r--t/recipes/checks/cruft/cruft-python/build-spec/debian/pycompat0
-rw-r--r--t/recipes/checks/cruft/cruft-python/build-spec/debian/pyversions1
-rw-r--r--t/recipes/checks/cruft/cruft-python/build-spec/fill-values4
-rwxr-xr-xt/recipes/checks/cruft/cruft-python/build-spec/pre-build31
-rw-r--r--t/recipes/checks/cruft/cruft-python/eval/desc2
-rw-r--r--t/recipes/checks/cruft/cruft-python/eval/hints6
7 files changed, 45 insertions, 0 deletions
diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/debian/missing-sources/fake.py b/t/recipes/checks/cruft/cruft-python/build-spec/debian/missing-sources/fake.py
new file mode 100644
index 0000000..6e883de
--- /dev/null
+++ b/t/recipes/checks/cruft/cruft-python/build-spec/debian/missing-sources/fake.py
@@ -0,0 +1 @@
+# a fake module source \ No newline at end of file
diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/debian/pycompat b/t/recipes/checks/cruft/cruft-python/build-spec/debian/pycompat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/recipes/checks/cruft/cruft-python/build-spec/debian/pycompat
diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/debian/pyversions b/t/recipes/checks/cruft/cruft-python/build-spec/debian/pyversions
new file mode 100644
index 0000000..6f290b0
--- /dev/null
+++ b/t/recipes/checks/cruft/cruft-python/build-spec/debian/pyversions
@@ -0,0 +1 @@
+>= 2.7
diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/fill-values b/t/recipes/checks/cruft/cruft-python/build-spec/fill-values
new file mode 100644
index 0000000..37c65d1
--- /dev/null
+++ b/t/recipes/checks/cruft/cruft-python/build-spec/fill-values
@@ -0,0 +1,4 @@
+Skeleton: upload-native
+Testname: cruft-python
+Description: Misc errors related to Python
+Extra-Build-Depends: python
diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/pre-build b/t/recipes/checks/cruft/cruft-python/build-spec/pre-build
new file mode 100755
index 0000000..a5ee0a0
--- /dev/null
+++ b/t/recipes/checks/cruft/cruft-python/build-spec/pre-build
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Create all the various junk that shouldn't exist in the diff so that we can
+# trigger all the tags.
+
+set -e
+dir="$1"
+fake="$dir/debian/missing-sources/fake.py"
+
+cp "$fake" "$dir"
+echo 'import fake' > "${dir}/main.py"
+unset PYTHONDONTWRITEBYTECODE
+PYTHONPATH="${dir}" python "${dir}/main.py" > /dev/null
+PYTHONPATH="${dir}" python -O "${dir}/main.py" > /dev/null
+# now remove source
+rm -f "${dir}"/main.py
+rm -f "${dir}"/fake.py
+
+cp "$fake" "$dir/fake2.py"
+echo 'import fake2' > "${dir}/main.py"
+unset PYTHONDONTWRITEBYTECODE
+PYTHONPATH="${dir}" python "${dir}/main.py" > /dev/null
+PYTHONPATH="${dir}" python -O "${dir}/main.py" > /dev/null
+# now remove source
+rm -f "${dir}"/main.py
+rm -f "${dir}"/fake2.py
+
+
+
+
+
diff --git a/t/recipes/checks/cruft/cruft-python/eval/desc b/t/recipes/checks/cruft/cruft-python/eval/desc
new file mode 100644
index 0000000..b3ba42b
--- /dev/null
+++ b/t/recipes/checks/cruft/cruft-python/eval/desc
@@ -0,0 +1,2 @@
+Testname: cruft-python
+Check: cruft
diff --git a/t/recipes/checks/cruft/cruft-python/eval/hints b/t/recipes/checks/cruft/cruft-python/eval/hints
new file mode 100644
index 0000000..6817461
--- /dev/null
+++ b/t/recipes/checks/cruft/cruft-python/eval/hints
@@ -0,0 +1,6 @@
+cruft-python (source): source-is-missing fake2.pyo
+cruft-python (source): source-is-missing fake2.pyc
+cruft-python (source): source-contains-prebuilt-python-object fake2.pyo
+cruft-python (source): source-contains-prebuilt-python-object fake2.pyc
+cruft-python (source): source-contains-prebuilt-python-object fake.pyo
+cruft-python (source): source-contains-prebuilt-python-object fake.pyc