Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: src/scripts/sync_build_test.sh

Issue 553063: Improvements for to continuous test loop. (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scripts/run_remote_tests.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/sync_build_test.sh
diff --git a/src/scripts/sync_build_test.sh b/src/scripts/sync_build_test.sh
index 763cc6a2cd669e8aad89d923d1d2686cf00481a7..d59109bd76aa98085fe62e2340287eb9baa9cb48 100755
--- a/src/scripts/sync_build_test.sh
+++ b/src/scripts/sync_build_test.sh
@@ -200,9 +200,9 @@ function describe_steps() {
fi
if [[ -n "${FLAGS_grab_buildbot}" ]]; then
if [[ "${FLAGS_grab_buildbot}" == "LATEST" ]]; then
- echo " * Grabbing latest buildbot image under ${FLAGS_buildbot_uri}"
+ echo " * Grab latest buildbot image under ${FLAGS_buildbot_uri}"
else
- echo " * Grabbing buildbot image zip at URI ${FLAGS_grab_buildbot}"
+ echo " * Grab buildbot image zip at URI ${FLAGS_grab_buildbot}"
fi
fi
if [[ ${FLAGS_mod_image_for_test} -eq ${FLAGS_TRUE} ]]; then
@@ -326,6 +326,22 @@ EOF
}
+function check_rootfs_validity() {
+ echo "Checking rootfs validity"
+ local device=$(sudo losetup -f)
+ local invalid=0
+ sudo losetup "${device}" rootfs.image
+ sudo mount "${device}" rootfs
+ if [[ ! -e rootfs/boot/vmlinuz ]]; then
+ echo "This image has no kernel"
+ invalid=1
+ fi
+ sudo umount rootfs
+ sudo losetup -d "${device}"
+ return ${invalid}
+}
+
+
# Downloads a buildbot image
function grab_buildbot() {
if [[ "${FLAGS_grab_buildbot}" == "LATEST" ]]; then
@@ -342,6 +358,7 @@ function grab_buildbot() {
-o "${dl_dir}/image.zip"
cd "${dl_dir}"
unzip image.zip
+ check_rootfs_validity
echo "Copying in local_repo/local_packages"
# TODO(kmixter): Make this architecture indep once buildbot is.
mv -f local_repo/local_packages/* "${FLAGS_top}/src/build/x86/local_packages"
« no previous file with comments | « src/scripts/run_remote_tests.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698