Skip to content

Commit 34a0a74

Browse files
committed
fixup! chore: add make test/go job
1 parent 2000bdc commit 34a0a74

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ jobs:
5050
strategy:
5151
matrix:
5252
kernel:
53-
- "5.8.5" # a 5.8 kernel, lowest supported minor release
53+
- "5.8.5" # a 5.8 kernel, lowest supported minor release
5454
- "5.11.22" # common kernel on cloud K8s
55-
- "5.16.0" # newish kernel
55+
- "5.16.0" # newish kernel
5656
architecture:
5757
- amd64 # little endian
5858
- s390x # big endian

ci/scripts/vm_test.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,14 @@ validate_checksum "$image_sum_file" "$image_path"
155155

156156
# Copy the image to make a fresh volume. We expand the image to increase from 2G
157157
# to a usable size.
158+
echo "+ Copying and resizing root volume"
158159
cp "$image_path" "$volume_file"
159160
qemu-img resize "$volume_file" +10G
160161

161162
# Generate an SSH key if one doesn't exist.
162163
ssh_key_path="$persistent_dir/id_ed25519"
163164
if [ ! -e "$ssh_key_path" ]; then
165+
echo "+ Generating SSH key file"
164166
ssh-keygen -t ed25519 -f "$ssh_key_path" -C "exectrace+test@coder.com" -q -N ""
165167
fi
166168

@@ -181,8 +183,14 @@ users:
181183
EOF
182184

183185
# Compile cloud-init config into a seed volume.
184-
cloudinit_seed_file="$(mktemp --suffix=.exectrace.cloud_init_seed.img)"
185-
cloud-localds -v --disk-format raw -f vfat "$cloudinit_seed_file" cloud_init.cfg
186+
echo "+ Creating cloud-init seed file"
187+
cloudinit_seed_file="$temp_dir/cloud_init_seed.img"
188+
cloud-localds \
189+
-v \
190+
--disk-format raw \
191+
--filesystem iso9660 \
192+
"$cloudinit_seed_file" \
193+
cloud_init.cfg
186194

187195
# Prepare arguments for qemu.
188196
pid_file="./qemu.pid"
@@ -202,6 +210,7 @@ qemu_args=(
202210
-monitor "unix:$monitor_socket,server,nowait"
203211
)
204212
if [[ "$(uname -m)" == "$arch" ]] || [[ "$(uname -m)" == "$vm_arch" ]]; then
213+
echo "+ Enabling KVM"
205214
qemu_args+=(
206215
--enable-kvm
207216
-cpu host
@@ -217,6 +226,7 @@ fi
217226

218227
# Arm requires EFI.
219228
if [[ "$arch" == *arm* ]]; then
229+
echo "+ Enabling EFI (due to arm requirement)"
220230
dd if=/dev/zero of=flash0.img bs=1M count=64
221231
dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc
222232
dd if=/dev/zero of=flash1.img bs=1M count=64
@@ -230,8 +240,7 @@ fi
230240
log_file="$(mktemp --tmpdir tmp.exectrace-qemu.XXXXX.log)"
231241
echoerr "Starting qemu with log file '$log_file'"
232242
echoerr "QEMU monitor will be available at '$monitor_socket'"
233-
#nohup sudo "qemu-system-$vm_arch" "${qemu_args[@]}" &>"$log_file" & disown
234-
sudo "qemu-system-$vm_arch" "${qemu_args[@]}"
243+
nohup sudo "qemu-system-$vm_arch" "${qemu_args[@]}" &>"$log_file" & disown
235244
sleep 5
236245

237246
dump_log() {
@@ -355,7 +364,7 @@ if [[ "\$(uname -r)" != *"$kernel_image_pkg_name"* ]]; then
355364
fi
356365
357366
# shellcheck disable=SC2088 # intentionally don't want ~ to expand by using "
358-
"~/$test_binary" -test.v -test.timeout=10m
367+
~/"$test_binary" -test.v -test.timeout=10m
359368
EOF
360369

361370
xssh poweroff || true

0 commit comments

Comments
 (0)