summaryrefslogtreecommitdiffstats
path: root/test/sadt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:53:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:53:52 +0000
commitefe47381c599b07e4c7bbdb2e91e8090a541c887 (patch)
tree05cf57183f5a23394eca11b00f97a74a5dfdf79d /test/sadt
parentInitial commit. (diff)
downloaddevscripts-upstream/2.23.4+deb12u1.tar.xz
devscripts-upstream/2.23.4+deb12u1.zip
Adding upstream version 2.23.4+deb12u1.upstream/2.23.4+deb12u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/sadt')
-rw-r--r--test/sadt/README5
-rw-r--r--test/sadt/comma-separated-restrictions/debian/control0
-rw-r--r--test/sadt/comma-separated-restrictions/debian/tests/control2
-rwxr-xr-xtest/sadt/comma-separated-restrictions/debian/tests/test1
-rw-r--r--test/sadt/comma-separated-tests/debian/control0
-rw-r--r--test/sadt/comma-separated-tests/debian/tests/control1
-rwxr-xr-xtest/sadt/comma-separated-tests/debian/tests/test11
-rwxr-xr-xtest/sadt/comma-separated-tests/debian/tests/test22
-rw-r--r--test/sadt/fails/debian/control0
-rw-r--r--test/sadt/fails/debian/tests/control1
-rwxr-xr-xtest/sadt/fails/debian/tests/fails1
-rw-r--r--test/sadt/flaky/debian/control0
-rw-r--r--test/sadt/flaky/debian/tests/control2
-rwxr-xr-xtest/sadt/flaky/debian/tests/flaky-fails1
-rwxr-xr-xtest/sadt/flaky/debian/tests/flaky-succeeds1
-rw-r--r--test/sadt/ignore-udebs/debian/control0
-rw-r--r--test/sadt/ignore-udebs/debian/tests/control1
-rwxr-xr-xtest/sadt/new9
-rw-r--r--test/sadt/passes/debian/control0
-rw-r--r--test/sadt/passes/debian/tests/control1
-rwxr-xr-xtest/sadt/passes/debian/tests/test1
-rw-r--r--test/sadt/skippable/debian/control0
-rw-r--r--test/sadt/skippable/debian/tests/control2
-rwxr-xr-xtest/sadt/skippable/debian/tests/skipped2
-rw-r--r--test/sadt/space-separated-restrictions/debian/control0
-rw-r--r--test/sadt/space-separated-restrictions/debian/tests/control2
-rwxr-xr-xtest/sadt/space-separated-restrictions/debian/tests/test1
-rw-r--r--test/sadt/space-separated-tests/debian/control0
-rw-r--r--test/sadt/space-separated-tests/debian/tests/control1
-rwxr-xr-xtest/sadt/space-separated-tests/debian/tests/test11
-rwxr-xr-xtest/sadt/space-separated-tests/debian/tests/test22
-rw-r--r--test/sadt/superficial-fails/debian/control0
-rw-r--r--test/sadt/superficial-fails/debian/tests/control2
-rwxr-xr-xtest/sadt/superficial-fails/debian/tests/test1
-rw-r--r--test/sadt/superficial/debian/control0
-rw-r--r--test/sadt/superficial/debian/tests/control2
-rwxr-xr-xtest/sadt/superficial/debian/tests/test1
-rw-r--r--test/sadt/test-command/debian/control0
-rw-r--r--test/sadt/test-command/debian/tests/control1
-rw-r--r--test/sadt/tests-directory/debian/control0
-rw-r--r--test/sadt/tests-directory/debian/tests/control2
-rwxr-xr-xtest/sadt/tests-directory/foo/test1
-rw-r--r--test/sadt/unskippable/debian/control0
-rw-r--r--test/sadt/unskippable/debian/tests/control1
-rwxr-xr-xtest/sadt/unskippable/debian/tests/unskippable2
-rw-r--r--test/sadt/unskipped/debian/control0
-rw-r--r--test/sadt/unskipped/debian/tests/control2
-rwxr-xr-xtest/sadt/unskipped/debian/tests/fails1
48 files changed, 57 insertions, 0 deletions
diff --git a/test/sadt/README b/test/sadt/README
new file mode 100644
index 0000000..7110a55
--- /dev/null
+++ b/test/sadt/README
@@ -0,0 +1,5 @@
+Each directory here is a fake Debian package with autopkgtests
+
+To create the basic structure for a new test case, run the "new" script, e.g.
+
+$ ./new my-test-case
diff --git a/test/sadt/comma-separated-restrictions/debian/control b/test/sadt/comma-separated-restrictions/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/comma-separated-restrictions/debian/control
diff --git a/test/sadt/comma-separated-restrictions/debian/tests/control b/test/sadt/comma-separated-restrictions/debian/tests/control
new file mode 100644
index 0000000..90f300c
--- /dev/null
+++ b/test/sadt/comma-separated-restrictions/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Restrictions: needs-recommends, allow-stderr
diff --git a/test/sadt/comma-separated-restrictions/debian/tests/test b/test/sadt/comma-separated-restrictions/debian/tests/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/comma-separated-restrictions/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/comma-separated-tests/debian/control b/test/sadt/comma-separated-tests/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/comma-separated-tests/debian/control
diff --git a/test/sadt/comma-separated-tests/debian/tests/control b/test/sadt/comma-separated-tests/debian/tests/control
new file mode 100644
index 0000000..3566d3e
--- /dev/null
+++ b/test/sadt/comma-separated-tests/debian/tests/control
@@ -0,0 +1 @@
+Tests: test1, test2
diff --git a/test/sadt/comma-separated-tests/debian/tests/test1 b/test/sadt/comma-separated-tests/debian/tests/test1
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/comma-separated-tests/debian/tests/test1
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/comma-separated-tests/debian/tests/test2 b/test/sadt/comma-separated-tests/debian/tests/test2
new file mode 100755
index 0000000..003e8fc
--- /dev/null
+++ b/test/sadt/comma-separated-tests/debian/tests/test2
@@ -0,0 +1,2 @@
+#!/bin/true
+
diff --git a/test/sadt/fails/debian/control b/test/sadt/fails/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/fails/debian/control
diff --git a/test/sadt/fails/debian/tests/control b/test/sadt/fails/debian/tests/control
new file mode 100644
index 0000000..317cd51
--- /dev/null
+++ b/test/sadt/fails/debian/tests/control
@@ -0,0 +1 @@
+Tests: fails
diff --git a/test/sadt/fails/debian/tests/fails b/test/sadt/fails/debian/tests/fails
new file mode 100755
index 0000000..98975b2
--- /dev/null
+++ b/test/sadt/fails/debian/tests/fails
@@ -0,0 +1 @@
+#!/bin/false
diff --git a/test/sadt/flaky/debian/control b/test/sadt/flaky/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/flaky/debian/control
diff --git a/test/sadt/flaky/debian/tests/control b/test/sadt/flaky/debian/tests/control
new file mode 100644
index 0000000..22feebd
--- /dev/null
+++ b/test/sadt/flaky/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: flaky-succeeds flaky-fails
+Restrictions: flaky
diff --git a/test/sadt/flaky/debian/tests/flaky-fails b/test/sadt/flaky/debian/tests/flaky-fails
new file mode 100755
index 0000000..98975b2
--- /dev/null
+++ b/test/sadt/flaky/debian/tests/flaky-fails
@@ -0,0 +1 @@
+#!/bin/false
diff --git a/test/sadt/flaky/debian/tests/flaky-succeeds b/test/sadt/flaky/debian/tests/flaky-succeeds
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/flaky/debian/tests/flaky-succeeds
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/ignore-udebs/debian/control b/test/sadt/ignore-udebs/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/ignore-udebs/debian/control
diff --git a/test/sadt/ignore-udebs/debian/tests/control b/test/sadt/ignore-udebs/debian/tests/control
new file mode 100644
index 0000000..79c6de9
--- /dev/null
+++ b/test/sadt/ignore-udebs/debian/tests/control
@@ -0,0 +1 @@
+Tests: ignore-udebs
diff --git a/test/sadt/new b/test/sadt/new
new file mode 100755
index 0000000..20fc7c3
--- /dev/null
+++ b/test/sadt/new
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+for sample in $@; do
+ mkdir -p "$sample"/debian/tests
+ touch "$sample/debian/control"
+ echo "Tests: $sample" > "$sample"/debian/tests/control
+done
diff --git a/test/sadt/passes/debian/control b/test/sadt/passes/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/passes/debian/control
diff --git a/test/sadt/passes/debian/tests/control b/test/sadt/passes/debian/tests/control
new file mode 100644
index 0000000..db2fda9
--- /dev/null
+++ b/test/sadt/passes/debian/tests/control
@@ -0,0 +1 @@
+Tests: test
diff --git a/test/sadt/passes/debian/tests/test b/test/sadt/passes/debian/tests/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/passes/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/skippable/debian/control b/test/sadt/skippable/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/skippable/debian/control
diff --git a/test/sadt/skippable/debian/tests/control b/test/sadt/skippable/debian/tests/control
new file mode 100644
index 0000000..491208f
--- /dev/null
+++ b/test/sadt/skippable/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: skipped
+Restrictions: skippable
diff --git a/test/sadt/skippable/debian/tests/skipped b/test/sadt/skippable/debian/tests/skipped
new file mode 100755
index 0000000..e1bcf85
--- /dev/null
+++ b/test/sadt/skippable/debian/tests/skipped
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 77
diff --git a/test/sadt/space-separated-restrictions/debian/control b/test/sadt/space-separated-restrictions/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/space-separated-restrictions/debian/control
diff --git a/test/sadt/space-separated-restrictions/debian/tests/control b/test/sadt/space-separated-restrictions/debian/tests/control
new file mode 100644
index 0000000..51483d4
--- /dev/null
+++ b/test/sadt/space-separated-restrictions/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Restrictions: needs-recommends allow-stderr
diff --git a/test/sadt/space-separated-restrictions/debian/tests/test b/test/sadt/space-separated-restrictions/debian/tests/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/space-separated-restrictions/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/space-separated-tests/debian/control b/test/sadt/space-separated-tests/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/space-separated-tests/debian/control
diff --git a/test/sadt/space-separated-tests/debian/tests/control b/test/sadt/space-separated-tests/debian/tests/control
new file mode 100644
index 0000000..c901e5a
--- /dev/null
+++ b/test/sadt/space-separated-tests/debian/tests/control
@@ -0,0 +1 @@
+Tests: test1 test2
diff --git a/test/sadt/space-separated-tests/debian/tests/test1 b/test/sadt/space-separated-tests/debian/tests/test1
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/space-separated-tests/debian/tests/test1
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/space-separated-tests/debian/tests/test2 b/test/sadt/space-separated-tests/debian/tests/test2
new file mode 100755
index 0000000..003e8fc
--- /dev/null
+++ b/test/sadt/space-separated-tests/debian/tests/test2
@@ -0,0 +1,2 @@
+#!/bin/true
+
diff --git a/test/sadt/superficial-fails/debian/control b/test/sadt/superficial-fails/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/superficial-fails/debian/control
diff --git a/test/sadt/superficial-fails/debian/tests/control b/test/sadt/superficial-fails/debian/tests/control
new file mode 100644
index 0000000..02ed109
--- /dev/null
+++ b/test/sadt/superficial-fails/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Restrictions: superficial
diff --git a/test/sadt/superficial-fails/debian/tests/test b/test/sadt/superficial-fails/debian/tests/test
new file mode 100755
index 0000000..98975b2
--- /dev/null
+++ b/test/sadt/superficial-fails/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/false
diff --git a/test/sadt/superficial/debian/control b/test/sadt/superficial/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/superficial/debian/control
diff --git a/test/sadt/superficial/debian/tests/control b/test/sadt/superficial/debian/tests/control
new file mode 100644
index 0000000..02ed109
--- /dev/null
+++ b/test/sadt/superficial/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Restrictions: superficial
diff --git a/test/sadt/superficial/debian/tests/test b/test/sadt/superficial/debian/tests/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/superficial/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/test-command/debian/control b/test/sadt/test-command/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/test-command/debian/control
diff --git a/test/sadt/test-command/debian/tests/control b/test/sadt/test-command/debian/tests/control
new file mode 100644
index 0000000..d52194b
--- /dev/null
+++ b/test/sadt/test-command/debian/tests/control
@@ -0,0 +1 @@
+Test-Command: echo 'Test-Command is supported'
diff --git a/test/sadt/tests-directory/debian/control b/test/sadt/tests-directory/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/tests-directory/debian/control
diff --git a/test/sadt/tests-directory/debian/tests/control b/test/sadt/tests-directory/debian/tests/control
new file mode 100644
index 0000000..145b7b5
--- /dev/null
+++ b/test/sadt/tests-directory/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Tests-Directory: foo
diff --git a/test/sadt/tests-directory/foo/test b/test/sadt/tests-directory/foo/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/tests-directory/foo/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/unskippable/debian/control b/test/sadt/unskippable/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/unskippable/debian/control
diff --git a/test/sadt/unskippable/debian/tests/control b/test/sadt/unskippable/debian/tests/control
new file mode 100644
index 0000000..c077ac5
--- /dev/null
+++ b/test/sadt/unskippable/debian/tests/control
@@ -0,0 +1 @@
+Tests: unskippable
diff --git a/test/sadt/unskippable/debian/tests/unskippable b/test/sadt/unskippable/debian/tests/unskippable
new file mode 100755
index 0000000..e1bcf85
--- /dev/null
+++ b/test/sadt/unskippable/debian/tests/unskippable
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 77
diff --git a/test/sadt/unskipped/debian/control b/test/sadt/unskipped/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/unskipped/debian/control
diff --git a/test/sadt/unskipped/debian/tests/control b/test/sadt/unskipped/debian/tests/control
new file mode 100644
index 0000000..d3ce911
--- /dev/null
+++ b/test/sadt/unskipped/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: fails
+Restrictions: skippable
diff --git a/test/sadt/unskipped/debian/tests/fails b/test/sadt/unskipped/debian/tests/fails
new file mode 100755
index 0000000..98975b2
--- /dev/null
+++ b/test/sadt/unskipped/debian/tests/fails
@@ -0,0 +1 @@
+#!/bin/false