diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/mma/mma_automated_test.sh | 14 | ||||
-rwxr-xr-x | util/mma/mma_setup_test.sh | 4 |
2 files changed, 15 insertions, 3 deletions
diff --git a/util/mma/mma_automated_test.sh b/util/mma/mma_automated_test.sh index 0e9596245d..b43325ba14 100755 --- a/util/mma/mma_automated_test.sh +++ b/util/mma/mma_automated_test.sh @@ -64,6 +64,10 @@ get_mma_autotest_params() { } main() { + # sleep 30 sec, before we start. This would give some time if we want + # to stop automation. + sleep 30s + mkdir -p "${MMA_LOCAL_DATA_STORAGE}" # Exit if there are no tests [ -e "${MMA_AUTOMATED_TEST_CONFIG}" ] || exit 0 @@ -87,7 +91,15 @@ main() { get_mma_autotest_params ${MMA_SETUP_TEST_TOOL} set ${MMA_TEST_NAME} ${MMA_TEST_PARAM} - reboot + # sync the filesystem, hoping this would minimize + # the chances of fs corruption + sync + sleep 2s + sync + sleep 2s + sync + sleep 2s + ectool reboot_ec } main "$@" diff --git a/util/mma/mma_setup_test.sh b/util/mma/mma_setup_test.sh index ecbedf85a5..7eb3c7c225 100755 --- a/util/mma/mma_setup_test.sh +++ b/util/mma/mma_setup_test.sh @@ -90,7 +90,7 @@ show_usage() { write_flash() { printf "Writing back flash contents "${flashrom_temp_image}"\n" - flashrom -p host -w "${flashrom_temp_image}" -i BOOT_STUB --fast-verify || \ + flashrom -p host -w "${flashrom_temp_image}" --fast-verify || \ { printf "failed to read flash\n" ; exit -1; @@ -180,7 +180,7 @@ main() { remove_file_if_exists "${flashrom_temp_image}" printf "Reading flash contents to "${flashrom_temp_image}"\n" - flashrom -p host -r "${flashrom_temp_image}" -i BOOT_STUB || \ + flashrom -p host -r "${flashrom_temp_image}" || \ { printf "failed to read flash\n" ; exit -1; |