mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-23 09:43:06 +00:00
e0c6a2281d
v5.5-rc1 was released this week. Run vmtest with it.
53 lines
1.4 KiB
Python
Executable File
53 lines
1.4 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
"""
|
|
We want to test drgn on multiple Python versions on Ubuntu in addition to
|
|
multiple kernel versions using the vmtest setup. The .travis.yml build matrix
|
|
can't easily express this, so this script generates the jobs manually.
|
|
"""
|
|
|
|
|
|
PYTHON = ['3.8', '3.7', '3.6']
|
|
KERNEL = ['5.5', '5.4', '5.3', '4.19', '4.14', '4.9', '4.4']
|
|
|
|
|
|
if __name__ == '__main__':
|
|
print("""\
|
|
# Generated by scripts/generate_travis_yml.py
|
|
|
|
dist: bionic
|
|
|
|
jobs:
|
|
include:""")
|
|
for python in PYTHON:
|
|
print(f"""\
|
|
- language: python
|
|
python: {python}
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libbz2-dev
|
|
- liblzma-dev
|
|
- zlib1g-dev
|
|
install:
|
|
script: python setup.py build -j "$(nproc)" test""")
|
|
for kernel in KERNEL:
|
|
print(f"""\
|
|
- name: "vmtest Linux {kernel}"
|
|
language: minimal
|
|
env: KERNEL={kernel}
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- qemu-kvm
|
|
- rsync
|
|
- zstd
|
|
install: sudo adduser "$USER" kvm
|
|
before_script:
|
|
# The double sudo is necessary to pick up the new group membership.
|
|
- sudo -E sudo -E -u "$USER" scripts/vmtest/run.sh -k "$KERNEL"'.*' -o -d ~ ~/root.img; exitstatus=$?
|
|
# Exit status 0 is success, 1 is test failure (should fail in the script
|
|
# step), anything else is an error (should fail here).
|
|
- test $exitstatus -le 1
|
|
script: test $exitstatus -eq 0""")
|