Skip to content

Commit

Permalink
Set date in image setup
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed Jul 1, 2024
1 parent 6375752 commit 74766e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/image.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [[ $1 == "setup" ]]; then
echo ", +" | sfdisk -N 2 "$3"
imageFile "mount" "$3"
rsync -avr --exclude="*.img" --exclude="*.sig" --exclude="tests/fs" --exclude="tests/dtb" --exclude="tests/kernel" ./ tests/fs/opt/zram
systemd-nspawn --directory="tests/fs" /opt/zram/tests/install-packages.bash
systemd-nspawn --directory="tests/fs" /opt/zram/tests/install-packages.bash "$(date)"
echo "set enable-bracketed-paste off" >> tests/fs/etc/inputrc # Prevents weird character output
cp tests/fs/boot/kernel* tests/kernel
# Compile a customized DTB
Expand Down
1 change: 1 addition & 0 deletions tests/install-packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ systemctl mask rpi-eeprom-update.service hciuart.service systemd-logind.service
rm -f /var/lib/apt/lists/lock
rm -f /var/cache/apt/archives/lock
rm -f /var/lib/dpkg/lock*
sudo date -s "$1"
4 changes: 1 addition & 3 deletions tests/run.exp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ expect {
exp_continue
}
"pi@raspberrypi:~$ " {
send "find /opt/zram/* -exec bash -c 'touch \"{}\"' - \; \r"
send "sudo /opt/zram/install.bash\r"
}
"Login incorrect" {
exit 1
Expand All @@ -41,8 +41,6 @@ expect {

# Run tests
expect "pi@raspberrypi:~$ "
send "sudo /opt/zram/install.bash\r"
expect "pi@raspberrypi:~$ "
send "/opt/zram/tests/test-zram-devices.bash\r"
expect {
-re "Test failed:.*$" {
Expand Down

0 comments on commit 74766e1

Please sign in to comment.