buttontest: Make more robust, add AC plug

We now verify that the i2c command completed.  It can fail, especially if
Senoko is busy when the I2C request arrives.

Add an AC plug test while we're at it.

Signed-off-by: Sean Cross <xobs@kosagi.com>
tests: Add actest, batterychargetest, copymmctosatatest

Initial versions that don't work.

Signed-off-by: Sean Cross <xobs@kosagi.com>
README: Update wording to reflect multiple versions

You can compile builds for desktop, laptop, and bare board by changing
a #define.

Signed-off-by: Sean Cross <xobs@kosagi.com>
actest: Implement test

Implement ACTest, which is used to monitor the status of the AC plug
and block until it has reached the defined state.

Signed-off-by: Sean Cross <xobs@kosagi.com>
batterychargetest: Implement battery tests

Battery tests involve an initial, conditioning, and final steps,
which are handled as three separate tests.  These implement very
specific logic.

Signed-off-by: Sean Cross <xobs@kosagi.com>
buttontest: Fix AC plug text

Ideally you'd use ACTest for this, but we fix the AC plug detection
test here so that it adds "AC Plug" to the list of strings to test.

Signed-off-by: Sean Cross <xobs@kosagi.com>
copymmctosatatest: Implement test

This test basically does a "dd" from the internal MMC to the external
Sata drive, then resizes the drive afterwards.  It is very similar to
the MMCCopyTest.

Signed-off-by: Sean Cross <xobs@kosagi.com>
destructivedisktest: Ensure files are flushed to disk

Drop the system caches to ensure everything is flushed.  This should be
more extreme than doing a sync(), as it ensures nothing resides in the
system's page cache.

Signed-off-by: Sean Cross <xobs@kosagi.com>
mmctest: Add Sata drive support

Add support for getting the path to the Sata disk.

Signed-off-by: Sean Cross <xobs@kosagi.com>
packageinstaller: Ensure packages are installed in chroot

We must pass --root to dpkg in order to install packages into the new
root filesystem.  Add functions to support mounting/unmounting the
disk, and fix dpkg installing to a chroot.

Signed-off-by: Sean Cross <xobs@kosagi.com>
senokoscript: Support checking for valid strings

This test now supports checking for appropriate strings, to ensure
Senoko is functioning properly.

Signed-off-by: Sean Cross <xobs@kosagi.com>
novena-test: Add new files to project

All the new tests need to be added to the project file.

Signed-off-by: Sean Cross <xobs@kosagi.com>
novenatestnegine: Add test plan for laptop model

The laptop test plan involves battery conditioning, and is more
complicated than the desktop model.

Signed-off-by: Sean Cross <xobs@kosagi.com>