mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 22:21:10 +02:00
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:
parent
d8797c3e4d
commit
5db44aa611
10
mod_for_test_scripts/400installFio
Executable file
10
mod_for_test_scripts/400installFio
Executable 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
|
||||
|
12
mod_for_test_scripts/b100fio
Normal file
12
mod_for_test_scripts/b100fio
Normal 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/"
|
||||
|
7
mod_for_test_scripts/b101libaio1
Normal file
7
mod_for_test_scripts/b101libaio1
Normal 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"
|
||||
|
@ -61,15 +61,23 @@ LOOP_DEV=`sudo losetup -f`
|
||||
sudo losetup "${LOOP_DEV}" "${FLAGS_image}"
|
||||
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"
|
||||
sudo mkdir -p "${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
|
||||
sudo chroot "${ROOT_FS_DIR}" "/modify_scripts/test_setup.sh"
|
||||
|
||||
|
||||
sudo umount "${ROOT_FS_DIR}/modify_scripts"
|
||||
sudo rmdir "${ROOT_FS_DIR}/modify_scripts"
|
||||
sudo rm -rf "${ROOT_FS_DIR}/modify_build"
|
||||
|
||||
cleanup
|
||||
trap - EXIT
|
||||
|
Loading…
x
Reference in New Issue
Block a user