Skip to content

Commit

Permalink
Extend release-testing script to support Aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Sep 19, 2023
1 parent 8c468fb commit 96affb2
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 20 deletions.
3 changes: 2 additions & 1 deletion release-process/distro-configs/centos8.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"sudo dnf install -y epel-release epel-next-release",
"sudo dnf update -y"
],
"install_build_deps": "sudo dnf install -y rpm ccache cmake gcc gcc-c++ gdb glibc-devel glibc-devel.i686 libstdc++-devel libstdc++-devel.i686 libstdc++-static libstdc++-static.i686 zlib-devel git python3 python3-pexpect rpm-build ninja-build capnproto capnproto-libs capnproto-devel",
"install_build_deps": "sudo dnf install -y rpm ccache cmake gcc gcc-c++ gdb glibc-devel libstdc++-devel zlib-devel git python3 python3-pexpect rpm-build ninja-build capnproto capnproto-libs capnproto-devel",
"install_build_deps_x86_64": "sudo dnf install -y glibc-devel.i686 libstdc++-devel.i686",
"install_test_deps": "sudo dnf install -y gtk3 dbus-glib xorg-x11-utils gnutls-devel libacl-devel openldap-devel tigervnc-server-minimal curl tar bzip2 libreoffice-writer",
"exclude_tests": ["x86/pkeys.*"]
}
3 changes: 2 additions & 1 deletion release-process/distro-configs/centos9.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"sudo dnf install -y epel-release epel-next-release",
"sudo dnf update -y"
],
"install_build_deps": "sudo dnf install -y rpm ccache cmake gcc gcc-c++ gdb glibc-devel glibc-devel.i686 libstdc++-devel libstdc++-devel.i686 libstdc++-static libstdc++-static.i686 zlib-devel git python3 python3-pexpect rpm-build ninja-build capnproto capnproto-libs capnproto-devel",
"install_build_deps": "sudo dnf install -y rpm ccache cmake gcc gcc-c++ gdb glibc-devel libstdc++-devel zlib-devel git python3 python3-pexpect rpm-build ninja-build capnproto capnproto-libs capnproto-devel",
"install_build_deps_x86_64": "sudo dnf install -y glibc-devel.i686 libstdc++-devel.i686",
"install_test_deps": "sudo dnf install -y gtk3 dbus-glib xorg-x11-utils gnutls-devel libacl-devel openldap-devel tigervnc-server-minimal curl tar bzip2 libreoffice-writer"
}
3 changes: 2 additions & 1 deletion release-process/distro-configs/debian10.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"sudo -E apt-get update -y",
"sudo -E apt-get dist-upgrade -f -y"
],
"install_build_deps": "sudo -E apt-get install -y rpm ccache cmake g++-multilib pkg-config zlib1g-dev git python-dev libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps": "sudo -E apt-get install -y rpm ccache cmake g++ pkg-config zlib1g-dev git python-dev libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps_x86_64": "sudo -E apt-get install -y g++-multilib",
"install_test_deps": "sudo -E apt-get install -y locales-all tightvncserver xtightvncviewer curl tar bzip2 libdbus-glib-1-2 libreoffice",
"exclude_tests": ["x86/pkeys.*"]
}
3 changes: 2 additions & 1 deletion release-process/distro-configs/debian11.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"sudo -E apt-get update -y",
"sudo -E apt-get dist-upgrade -f -y"
],
"install_build_deps": "sudo -E apt-get install -y rpm ccache cmake g++-multilib pkg-config zlib1g-dev git python-dev libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps": "sudo -E apt-get install -y rpm ccache cmake g++ pkg-config zlib1g-dev git python-dev libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps_x86_64": "sudo -E apt-get install -y g++-multilib",
"install_test_deps": "sudo -E apt-get install -y locales-all tightvncserver xtightvncviewer curl tar bzip2 libdbus-glib-1-2 libreoffice"
}
3 changes: 2 additions & 1 deletion release-process/distro-configs/debian12.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"sudo -E apt-get update -y",
"sudo -E apt-get dist-upgrade -f -y"
],
"install_build_deps": "sudo -E apt-get install -y rpm ccache cmake g++-multilib pkg-config zlib1g-dev git python-dev-is-python3 libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps": "sudo -E apt-get install -y rpm ccache cmake g++ pkg-config zlib1g-dev git python-dev-is-python3 libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps_x86_64": "sudo -E apt-get install -y g++-multilib",
"install_test_deps": "sudo -E apt-get install -y locales-all tightvncserver xtightvncviewer curl tar bzip2 libdbus-glib-1-2 libreoffice"
}
3 changes: 2 additions & 1 deletion release-process/distro-configs/ubuntu18-lts.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"sudo apt-get update -y",
"sudo apt-get dist-upgrade -f -y"
],
"install_build_deps": "sudo apt-get install -y rpm ccache cmake g++-multilib pkg-config zlib1g-dev git python-dev libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps": "sudo apt-get install -y rpm ccache cmake g++ pkg-config zlib1g-dev git python-dev libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps_x86_64": "sudo apt-get install -y g++-multilib",
"install_test_deps": "sudo apt-get install -y tightvncserver xtightvncviewer curl tar bzip2 libdbus-glib-1-2 libreoffice",
"exclude_tests": ["x86/pkeys.*"]
}
3 changes: 2 additions & 1 deletion release-process/distro-configs/ubuntu20-lts.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"sudo apt-get update -y",
"sudo apt-get dist-upgrade -f -y"
],
"install_build_deps": "sudo apt-get install -y rpm ccache cmake g++-multilib pkg-config zlib1g-dev git python-dev libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps": "sudo apt-get install -y rpm ccache cmake g++ pkg-config zlib1g-dev git python-dev libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps_x86_64": "sudo apt-get install -y g++-multilib",
"install_test_deps": "sudo apt-get install -y tightvncserver xtightvncviewer curl tar bzip2 libdbus-glib-1-2 libreoffice",
"exclude_tests": ["x86/pkeys.*"]
}
3 changes: 2 additions & 1 deletion release-process/distro-configs/ubuntu22-lts.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"sudo apt-get update -y",
"sudo apt-get dist-upgrade -f -y"
],
"install_build_deps": "sudo apt-get install -y rpm ccache cmake g++-multilib pkg-config zlib1g-dev git python-dev-is-python3 libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps": "sudo apt-get install -y rpm ccache cmake g++ pkg-config zlib1g-dev git python-dev-is-python3 libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps_x86_64": "sudo apt-get install -y g++-multilib",
"install_test_deps": "sudo apt-get install -y tightvncserver xtightvncviewer curl tar bzip2 libdbus-glib-1-2 libreoffice"
}
3 changes: 2 additions & 1 deletion release-process/distro-configs/ubuntu23.04.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"sudo apt-get update -y",
"sudo apt-get dist-upgrade -f -y"
],
"install_build_deps": "sudo apt-get install -y rpm ccache cmake g++-multilib pkg-config zlib1g-dev git python-dev-is-python3 libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps": "sudo apt-get install -y rpm ccache cmake g++ pkg-config zlib1g-dev git python-dev-is-python3 libacl1-dev ninja-build manpages-dev capnproto libcapnp-dev gdb python3-pexpect",
"install_build_deps_x86_64": "sudo apt-get install -y g++-multilib",
"install_test_deps": "sudo apt-get install -y tightvncserver xtightvncviewer curl tar bzip2 libdbus-glib-1-2 libreoffice"
}
6 changes: 4 additions & 2 deletions release-process/rr-testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ if [[ $test_firefox == 1 ]]; then
xvnc-runner "/tmp/firefox/firefox --profile /tmp/firefox-profile $HOME/rr/release-process/test-data/test.html" "rr Test Page"
fi

rm -rf ~/.config/libreoffice || true
xvnc-runner "libreoffice $HOME/rr/release-process/test-data/rr-test-doc.odt" "rr-test-doc.odt"
if [[ $test_libreoffice == 1 ]]; then
rm -rf ~/.config/libreoffice || true
xvnc-runner "libreoffice $HOME/rr/release-process/test-data/rr-test-doc.odt" "rr-test-doc.odt"
fi

if [[ $build_dist != 0 ]]; then
make -j`nproc` dist
Expand Down
31 changes: 22 additions & 9 deletions release-process/test-system.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
parser.add_argument('architecture')
parser.add_argument('keypair_pem_file')
parser.add_argument('--git-revision', default='master')
parser.add_argument('--machine-type', default='c5.9xlarge')
parser.add_argument('--machine-type')
parser.add_argument('--keep-vm', action='store_true')
parser.add_argument('--keep-vm-on-error', action='store_true')
parser.add_argument('--dist-files-dir')
Expand Down Expand Up @@ -127,22 +127,32 @@ def terminate(self):
with pathlib.Path(__file__).with_name('rr-testing.sh').open('rb') as f:
rr_testing_script = f.read()

def config_script_function(config_key):
lines = []
def get_config_lines(config_key):
entry = distro_config.get(config_key)
if isinstance(entry, str):
lines = [entry]
elif isinstance(entry, list):
lines = entry
elif entry is not None:
raise ValueError('Invalid config entry %s: %s' % (config_key, entry))
return [entry]
if isinstance(entry, list):
return entry
if entry is None:
return []
raise ValueError('Invalid config entry %s: %s' % (config_key, entry))

def config_script_function(config_key):
lines = get_config_lines(config_key) + get_config_lines('%s_%s'%(config_key, args.architecture))
return ('function %s {\n%s\n}' % (config_key, '\n'.join(lines)))

if args.dist_files_dir and not distro_config.get('staticlibs', True):
print('Dist builds must use staticlibs, aborting', file=sys.stderr)
sys.exit(1)

vm = Ec2Vm(args.machine_type, args.architecture, distro_config, args.keypair_pem_file)
machine_type = args.machine_type
if not machine_type:
if args.architecture == 'x86_64':
machine_type = 'c5.9xlarge'
elif args.architecture == 'arm64':
machine_type = 'c6g.8xlarge'

vm = Ec2Vm(machine_type, args.architecture, distro_config, args.keypair_pem_file)
success = False
try:
vm.wait_for_ssh()
Expand All @@ -155,7 +165,10 @@ def config_script_function(config_key):
'git_revision=%s'%args.git_revision,
'staticlibs=%s'%('TRUE' if distro_config.get('staticlibs', True) else 'FALSE'),
'build_dist=%d'%(1 if args.dist_files_dir is not None else 0),
# Firefox doesn't have release tarballs for Aarch64
'test_firefox=%d'%(1 if args.architecture == 'x86_64' else 0),
# libreoffice uses STREX
'test_libreoffice=%d'%(1 if args.architecture == 'x86_64' else 0),
'ctest_options="%s"'%' '.join('-E %s'%r for r in exclude_tests),
]).encode('utf-8') + b'\n' + rr_testing_script
vm.ssh(['/bin/bash', '-s'], full_script)
Expand Down

0 comments on commit 96affb2

Please sign in to comment.