diff --git a/tests/image.bash b/tests/image.bash index 8b565d8..08100ba 100755 --- a/tests/image.bash +++ b/tests/image.bash @@ -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 diff --git a/tests/install-packages.bash b/tests/install-packages.bash index 57f094e..a238490 100755 --- a/tests/install-packages.bash +++ b/tests/install-packages.bash @@ -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" diff --git a/tests/run.exp b/tests/run.exp index dfce7f4..a2f4b00 100755 --- a/tests/run.exp +++ b/tests/run.exp @@ -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 @@ -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:.*$" {