mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 05:56:58 +02:00
Start using the more complete test_image_content test for the build root and add the test to the end of build_packages.
30 lines
756 B
Bash
Executable File
30 lines
756 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright (c) 2012 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.
|
|
|
|
SCRIPT_ROOT=$(readlink -f $(dirname "$0")/..)
|
|
. "${SCRIPT_ROOT}/common.sh" || exit 1
|
|
. "${BUILD_LIBRARY_DIR}/test_image_content.sh" || exit 1
|
|
|
|
# We're invoked only by build_image, which runs in the chroot
|
|
assert_inside_chroot
|
|
|
|
# Flags
|
|
DEFINE_string root "${DEFAULT_BOARD+/build/${DEFAULT_BOARD}}" \
|
|
"The root file system to check."
|
|
|
|
# Parse command line
|
|
FLAGS "$@" || exit 1
|
|
eval set -- "${FLAGS_ARGV}"
|
|
|
|
# Die on any errors
|
|
switch_to_strict_mode
|
|
|
|
if [[ ! -d "$FLAGS_root" ]]; then
|
|
die_notrace "Root FS does not exist ($FLAGS_root)"
|
|
fi
|
|
|
|
test_image_content "$FLAGS_root"
|