drop tests
This commit is contained in:
parent
cfb6102755
commit
ae7b2275b8
2
debian/.gitignore
vendored
2
debian/.gitignore
vendored
@ -13,7 +13,6 @@
|
|||||||
!/signing_templates/
|
!/signing_templates/
|
||||||
!/source/
|
!/source/
|
||||||
!/templates/
|
!/templates/
|
||||||
!/tests/
|
|
||||||
!/upstream/
|
!/upstream/
|
||||||
|
|
||||||
# Ignore files generated by gencontrol
|
# Ignore files generated by gencontrol
|
||||||
@ -26,7 +25,6 @@
|
|||||||
/generated.*/
|
/generated.*/
|
||||||
/linux-*
|
/linux-*
|
||||||
/rules.gen
|
/rules.gen
|
||||||
/tests/control
|
|
||||||
!/linux-bpf-dev.*
|
!/linux-bpf-dev.*
|
||||||
!/linux-cpupower.*
|
!/linux-cpupower.*
|
||||||
!/linux-perf.*
|
!/linux-perf.*
|
||||||
|
24
debian/bin/gencontrol.py
vendored
24
debian/bin/gencontrol.py
vendored
@ -86,9 +86,6 @@ class Gencontrol(Base):
|
|||||||
makeflags['SOURCE_BASENAME'] = vars['source_basename']
|
makeflags['SOURCE_BASENAME'] = vars['source_basename']
|
||||||
makeflags['SOURCE_SUFFIX'] = vars['source_suffix']
|
makeflags['SOURCE_SUFFIX'] = vars['source_suffix']
|
||||||
|
|
||||||
# Prepare to generate debian/tests/control
|
|
||||||
self.tests_control = list(self.templates.get_tests_control('main.tests-control', vars))
|
|
||||||
|
|
||||||
def do_main_makefile(
|
def do_main_makefile(
|
||||||
self,
|
self,
|
||||||
config: ConfigMerged,
|
config: ConfigMerged,
|
||||||
@ -441,22 +438,6 @@ linux-signed-{vars['arch']} (@signedtemplate_sourceversion@) {dist}; urgency={ur
|
|||||||
for package in packages_own:
|
for package in packages_own:
|
||||||
package.build_profiles[0].neg.add('pkg.linux.quick')
|
package.build_profiles[0].neg.add('pkg.linux.quick')
|
||||||
|
|
||||||
tests_control_image = self.templates.get_tests_control('image.tests-control', vars)
|
|
||||||
for c in tests_control_image:
|
|
||||||
c.depends.extend(
|
|
||||||
[i.name for i in packages_image_unsigned]
|
|
||||||
)
|
|
||||||
|
|
||||||
tests_control_headers = self.templates.get_tests_control('headers.tests-control', vars)
|
|
||||||
for c in tests_control_headers:
|
|
||||||
c.depends.extend(
|
|
||||||
[i.name for i in packages_headers] +
|
|
||||||
[i.name for i in packages_image_unsigned]
|
|
||||||
)
|
|
||||||
|
|
||||||
self.tests_control.extend(tests_control_image)
|
|
||||||
self.tests_control.extend(tests_control_headers)
|
|
||||||
|
|
||||||
kconfig = []
|
kconfig = []
|
||||||
for c in config.config:
|
for c in config.config:
|
||||||
for d in self.config_dirs:
|
for d in self.config_dirs:
|
||||||
@ -522,7 +503,6 @@ linux-signed-{vars['arch']} (@signedtemplate_sourceversion@) {dist}; urgency={ur
|
|||||||
|
|
||||||
def write(self) -> None:
|
def write(self) -> None:
|
||||||
super().write()
|
super().write()
|
||||||
self.write_tests_control()
|
|
||||||
self.write_signed()
|
self.write_signed()
|
||||||
|
|
||||||
def write_signed(self) -> None:
|
def write_signed(self) -> None:
|
||||||
@ -549,10 +529,6 @@ linux-signed-{vars['arch']} (@signedtemplate_sourceversion@) {dist}; urgency={ur
|
|||||||
with bundle.path('files.json').open('w') as f:
|
with bundle.path('files.json').open('w') as f:
|
||||||
json.dump({'packages': pkg_sign_entries}, f, indent=2)
|
json.dump({'packages': pkg_sign_entries}, f, indent=2)
|
||||||
|
|
||||||
def write_tests_control(self) -> None:
|
|
||||||
with open("debian/tests/control", 'w') as f:
|
|
||||||
write_deb822(self.tests_control, f)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
Gencontrol()()
|
Gencontrol()()
|
||||||
|
36
debian/lib/python/debian_linux/debian.py
vendored
36
debian/lib/python/debian_linux/debian.py
vendored
@ -697,39 +697,3 @@ class BinaryPackage(_BasePackage):
|
|||||||
deb822_load=lambda v: v.split(),
|
deb822_load=lambda v: v.split(),
|
||||||
deb822_dump=None,
|
deb822_dump=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass
|
|
||||||
class TestsControl:
|
|
||||||
tests: Optional[str] = field_deb822(
|
|
||||||
'Tests',
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
test_command: Optional[str] = field_deb822(
|
|
||||||
'Test-Command',
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
architecture: PackageArchitecture = field_deb822(
|
|
||||||
'Architecture',
|
|
||||||
default_factory=PackageArchitecture,
|
|
||||||
)
|
|
||||||
restrictions: Optional[str] = field_deb822(
|
|
||||||
'Restrictions',
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
features: Optional[str] = field_deb822(
|
|
||||||
'Features',
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
depends: PackageRelation = field_deb822(
|
|
||||||
'Depends',
|
|
||||||
default_factory=PackageRelation,
|
|
||||||
)
|
|
||||||
tests_directory: Optional[str] = field_deb822(
|
|
||||||
'Tests-Directory',
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
classes: Optional[str] = field_deb822(
|
|
||||||
'Classes',
|
|
||||||
default=None,
|
|
||||||
)
|
|
||||||
|
7
debian/lib/python/debian_linux/utils.py
vendored
7
debian/lib/python/debian_linux/utils.py
vendored
@ -7,7 +7,7 @@ import typing
|
|||||||
import jinja2
|
import jinja2
|
||||||
|
|
||||||
from .dataclasses_deb822 import read_deb822
|
from .dataclasses_deb822 import read_deb822
|
||||||
from .debian import SourcePackage, BinaryPackage, TestsControl
|
from .debian import SourcePackage, BinaryPackage
|
||||||
|
|
||||||
|
|
||||||
class Templates(object):
|
class Templates(object):
|
||||||
@ -77,11 +77,6 @@ class Templates(object):
|
|||||||
) -> typing.Iterable[SourcePackage]:
|
) -> typing.Iterable[SourcePackage]:
|
||||||
return read_deb822(SourcePackage, io.StringIO(self.get(key, context)))
|
return read_deb822(SourcePackage, io.StringIO(self.get(key, context)))
|
||||||
|
|
||||||
def get_tests_control(
|
|
||||||
self, key: str, context: dict[str, str] = {},
|
|
||||||
) -> typing.Iterable[TestsControl]:
|
|
||||||
return read_deb822(TestsControl, io.StringIO(self.get(key, context)))
|
|
||||||
|
|
||||||
|
|
||||||
class TextWrapper(textwrap.TextWrapper):
|
class TextWrapper(textwrap.TextWrapper):
|
||||||
wordsep_re = re.compile(
|
wordsep_re = re.compile(
|
||||||
|
3
debian/rules
vendored
3
debian/rules
vendored
@ -83,8 +83,7 @@ clean-generated:
|
|||||||
debian/linux-image-*.preinst \
|
debian/linux-image-*.preinst \
|
||||||
debian/linux-image-*.prerm \
|
debian/linux-image-*.prerm \
|
||||||
debian/linux-source.maintscript \
|
debian/linux-source.maintscript \
|
||||||
debian/rules.gen \
|
debian/rules.gen
|
||||||
debian/tests/control
|
|
||||||
|
|
||||||
maintainerclean: clean-generated
|
maintainerclean: clean-generated
|
||||||
rm -rf $(filter-out debian .git, $(wildcard * .[^.]*))
|
rm -rf $(filter-out debian .git, $(wildcard * .[^.]*))
|
||||||
|
4
debian/templates/headers.tests-control.in
vendored
4
debian/templates/headers.tests-control.in
vendored
@ -1,4 +0,0 @@
|
|||||||
Test-Command: debian/tests/headers-kbuild @abiname@@localversion@
|
|
||||||
Architecture: @arch@
|
|
||||||
Restrictions: skip-not-installable, superficial
|
|
||||||
Features: test-name=headers-kbuild@localversion@
|
|
0
debian/templates/image.tests-control.in
vendored
0
debian/templates/image.tests-control.in
vendored
3
debian/templates/main.tests-control.in
vendored
3
debian/templates/main.tests-control.in
vendored
@ -1,3 +0,0 @@
|
|||||||
Test-Command: py.test debian/lib/python
|
|
||||||
Depends: python3-pytest, python3-jinja2
|
|
||||||
Restrictions: superficial
|
|
46
debian/tests/headers-kbuild
vendored
46
debian/tests/headers-kbuild
vendored
@ -1,46 +0,0 @@
|
|||||||
#!/bin/sh -eu
|
|
||||||
|
|
||||||
KERNEL_RELEASE="$1"
|
|
||||||
|
|
||||||
mkdir "$AUTOPKGTEST_TMP"/foo
|
|
||||||
cat >"$AUTOPKGTEST_TMP"/foo/foo.c <<EOF
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
|
|
||||||
static int __init foo_init(void)
|
|
||||||
{
|
|
||||||
pr_info("foo initialised\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
module_init(foo_init);
|
|
||||||
|
|
||||||
static void __exit foo_exit(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
module_exit(foo_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
EOF
|
|
||||||
cat >"$AUTOPKGTEST_TMP"/foo/Kbuild <<EOF
|
|
||||||
obj-m += foo.o
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "I: Build for $KERNEL_RELEASE"
|
|
||||||
# There are some warnings sent to stderr that we need to suppress,
|
|
||||||
# but any other output to stderr should be treated as a failure.
|
|
||||||
# We also want all stdout/stderr to appear in order in the log.
|
|
||||||
# First, duplicate stdout to fd 3
|
|
||||||
exec 3>&1
|
|
||||||
# Next, run the build with stdout sent to the original stdout and
|
|
||||||
# stderr sent through tee to both the original stdout and a file
|
|
||||||
make -C /lib/modules/"$KERNEL_RELEASE"/build M="$AUTOPKGTEST_TMP"/foo V=1 \
|
|
||||||
2>&1 1>&3 | tee "$AUTOPKGTEST_TMP"/foo/make.stderr
|
|
||||||
# Close fd 3
|
|
||||||
exec 3>&-
|
|
||||||
# Check for any stderr output that doesn't match the suppressions
|
|
||||||
if grep -q -v -E 'Skipping BTF generation .* due to unavailability of vmlinux' "$AUTOPKGTEST_TMP"/foo/make.stderr; then
|
|
||||||
echo >&2 "E: Unexpected warning/error messages"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "I: Clean"
|
|
||||||
make -C /lib/modules/"$KERNEL_RELEASE"/build M="$AUTOPKGTEST_TMP"/foo V=1 clean
|
|
Loading…
Reference in New Issue
Block a user