Add fio based autotest cases.

- Rev chromeos-systemtests, and add fio as a dependency.
- Add fio into the image during mod_image_for_test.sh

Review URL: http://chromereview.prom.corp.google.com/1180028

git-svn-id: svn://chrome-svn/chromeos/trunk@297 06c00378-0e64-4dae-be16-12b19f9950a1
This commit is contained in:
kwaters@google.com 2009-11-19 22:31:21 +00:00
parent d8797c3e4d
commit 5db44aa611
4 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,10 @@
#!/bin/bash
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Install fio and libaio1
dpkg --install /modify_build/libaio1_*.deb
dpkg --install /modify_build/fio_*.deb

View File

@ -0,0 +1,12 @@
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# build fio
pushd "${GCLIENT_ROOT}/src/third_party/fio"
./make_pkg.sh
popd
sudo cp "${DEFAULT_BUILD_ROOT}"/x86/local_packages/fio_*.deb \
"${ROOT_FS_DIR}/modify_build/"

View File

@ -0,0 +1,7 @@
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
sudo cp "${DEFAULT_IMG_MIRROR#*://}"/pool/main/liba/libaio/libaio1_*.deb \
"${ROOT_FS_DIR}/modify_build"

View File

@ -61,15 +61,23 @@ LOOP_DEV=`sudo losetup -f`
sudo losetup "${LOOP_DEV}" "${FLAGS_image}" sudo losetup "${LOOP_DEV}" "${FLAGS_image}"
sudo mount "${LOOP_DEV}" "${ROOT_FS_DIR}" sudo mount "${LOOP_DEV}" "${ROOT_FS_DIR}"
# Run build steps for modify for test
sudo mkdir -p "${ROOT_FS_DIR}/modify_build"
scripts_dir="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
for script in "${scripts_dir}"/b[0-9][0-9][0-9]*[!$~]; do
. ${script}
done
MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts" MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts"
sudo mkdir -p "${ROOT_FS_DIR}/modify_scripts" sudo mkdir -p "${ROOT_FS_DIR}/modify_scripts"
sudo mount --bind "${MOD_SCRIPTS_ROOT}" "${ROOT_FS_DIR}/modify_scripts" sudo mount --bind "${MOD_SCRIPTS_ROOT}" "${ROOT_FS_DIR}/modify_scripts"
# Run test setup script inside chroot jail to modify the image # Run test setup script inside chroot jail to modify the image
sudo chroot "${ROOT_FS_DIR}" "/modify_scripts/test_setup.sh" sudo chroot "${ROOT_FS_DIR}" "/modify_scripts/test_setup.sh"
sudo umount "${ROOT_FS_DIR}/modify_scripts" sudo umount "${ROOT_FS_DIR}/modify_scripts"
sudo rmdir "${ROOT_FS_DIR}/modify_scripts" sudo rmdir "${ROOT_FS_DIR}/modify_scripts"
sudo rm -rf "${ROOT_FS_DIR}/modify_build"
cleanup cleanup
trap - EXIT trap - EXIT