[Fuego] [PATCH 03/11] kernel_build: check build target in pre_check
Daniel Sangorrin
daniel.sangorrin at toshiba.co.jp
Tue Sep 25 06:58:44 UTC 2018
test_build could be skipped
Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
engine/tests/Functional.kernel_build/fuego_test.sh | 23 ++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/engine/tests/Functional.kernel_build/fuego_test.sh b/engine/tests/Functional.kernel_build/fuego_test.sh
index 2d36055..687a6f4 100755
--- a/engine/tests/Functional.kernel_build/fuego_test.sh
+++ b/engine/tests/Functional.kernel_build/fuego_test.sh
@@ -15,6 +15,10 @@ function test_pre_check {
assert_define PROGRAM_FLEX
fi
+ if [ -z "$FUNCTIONAL_KERNEL_BUILD_TARGET" ]; then
+ FUNCTIONAL_KERNEL_BUILD_TARGET="bzImage"
+ fi
+
if [[ "$FUNCTIONAL_KERNEL_BUILD_TARGET" == *"uImage"* ]]; then
is_on_sdk mkimage
fi
@@ -36,10 +40,6 @@ function test_build {
# Building
echo "Building Kernel"
- if [ -z "$FUNCTIONAL_KERNEL_BUILD_TARGET" ]; then
- FUNCTIONAL_KERNEL_BUILD_TARGET="bzImage"
- fi
-
if [ -z "$FUNCTIONAL_KERNEL_BUILD_PARAMS" ]; then
FUNCTIONAL_KERNEL_BUILD_PARAMS="-j$(nproc)"
fi
@@ -58,6 +58,7 @@ function test_build {
cd ..
rm -rf built_modules
fi
+ BUILD_EXECUTED=1
}
function test_deploy {
@@ -94,11 +95,17 @@ function test_deploy {
}
function test_processing {
- echo "Processing kernel build log"
- if [ -z "$FUNCTIONAL_KERNEL_BUILD_REGEX_P" ]; then
- log_compare "$TESTDIR" "1" "[ \t]*Kernel: arch/.* is ready" "p"
+ if [ -z "$BUILD_EXECUTED" ]; then
+ echo "test_build was not executed, so there is not log to parse"
+ RETURN_VALUE=0
+ return $RETURN_VALUE
else
- log_compare "$TESTDIR" "1" "$FUNCTIONAL_KERNEL_BUILD_REGEX_P" "p"
+ echo "Processing kernel build log"
+ if [ -z "$FUNCTIONAL_KERNEL_BUILD_REGEX_P" ]; then
+ log_compare "$TESTDIR" "1" "[ \t]*Kernel: arch/.* is ready" "p"
+ else
+ log_compare "$TESTDIR" "1" "$FUNCTIONAL_KERNEL_BUILD_REGEX_P" "p"
+ fi
fi
}
--
2.7.4
More information about the Fuego
mailing list