Implement "golden" images that passed run-time testing.
PATCH 1/1 Implement "golden" images that passed run-time testing.
From: Denys Dmytriyenko <[email protected]>
Signed-off-by Denys Dmytriyenko <[email protected]>
--- build-oesdk.sh | 7 +++++++ configs/arago-core-tisdk-daisy-puget.txt | 4 ++++ lib/oesdk/bitbake-test-sdk-image | 35 ++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+)
build-oesdk.sh +7 -0
@@ -218,4 +218,11 @@ then rsync -az --delete $BUILD_ROOT/build-*/arago-tmp*/deploy/ $WEB_HOST/deploy/ fi +echo "Copying golden/ directory" +# If COPY_GOLDEN_TO_WEB is set then copy to the WEB_HOST. +if [ "$COPY_GOLDEN_TO_WEB" == "true" ] +then + rsync -az --delete $BUILD_ROOT/build-*/arago-tmp*/golden/ $WEB_HOST/golden/ +fi + echo "Build Finished"
configs/arago-core-tisdk-daisy-puget.txt +4 -0
@@ -307,6 +307,10 @@ COPY_TO_WEB="true" # such as images, IPK feeds etc, so may not be distributed publicly as is. COPY_DEPLOY_TO_WEB="true" +# This variable specifies whether or not to copy the "golden" contents to a +# remote web hosting server. These are images that passed run-time tests. +COPY_GOLDEN_TO_WEB="true" + # This variable points to the user@webhost:<basepath> location where the # deploy contents should be placed. This is best done if you have done a # key exchange between these systems so that your SCP command will not ask
lib/oesdk/bitbake-test-sdk-image +35 -0
@@ -271,9 +271,38 @@ copy_files_to_package_root() { cp $test_dir/temp/filesystem/$FS_FILTER*.$FS_IMAGE_TYPE $root_partition/rootfs_partition.$FS_IMAGE_TYPE } +copy_golden_image() { + # Set m for logging purposes + m=$1 + + arago_tmp=`ls | grep "arago-tmp-*"` + + # This is a critical failure and will not be able to be skipped + if [ "$arago_tmp" == "" ] + then + echo "Could not find the arago-tmp directory" + return 1 + fi + + img_path="$arago_tmp/deploy/images/$m" + + # check that the img_path exists + if [ ! -d $img_path ] + then + echo "Images directory for machine $m is missing from arago-tmp" + return 1 + fi + + dest_path="$arago_tmp/golden/" + rm -rf $dest_path/$m + + cp -a $img_path $dest_path +} + test_sdk_image() { # Set m for logging purposes m="$1" + test_passed="false" # Create a temporary directory to extract the build files to for # testing. If the directory already exists then delete the old
@@ -319,6 +348,7 @@ test_sdk_image() { fi else echo "PASSED" > $LOG_DIR/$m-test-result.txt + test_passed="true" fi else
@@ -334,6 +364,11 @@ test_sdk_image() { then copy_files_to_package_root $m fi + + if [ "$test_passed" == "true" -a $COPY_GOLDEN_TO_WEB == "true" ] + then + copy_golden_image $m + fi } # This function receives a comma separated list of machines to build and test.
Signature · 1 line
2.2.0