From 9fb14641dfd6e25468b01c1b77a55d41bd2b8e51 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Wed, 23 Nov 2016 10:34:12 -0500 Subject: [PATCH] Lava: Include kernel version and shorten commit id in archive filenames Signed-off-by: Francis Deslauriers --- scripts/lttng-baremetal-tests/build-kernel.sh | 4 ++-- scripts/lttng-baremetal-tests/build-modules.sh | 2 +- .../generate-properties-master.sh | 16 +++++++++------- .../generate-properties-slave.sh | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/lttng-baremetal-tests/build-kernel.sh b/scripts/lttng-baremetal-tests/build-kernel.sh index eb32c9c..7f0cca7 100644 --- a/scripts/lttng-baremetal-tests/build-kernel.sh +++ b/scripts/lttng-baremetal-tests/build-kernel.sh @@ -23,9 +23,9 @@ make --directory="$LINUX_PATH" INSTALL_MOD_PATH="$MODULES_INSTALL_FOLDER" module cp "$LINUX_PATH"/arch/x86/boot/bzImage "$DEPLOYDIR"/"$KERNEL_COMMIT_ID".bzImage cp "$LINUX_PATH"/.config "$DEPLOYDIR"/"$KERNEL_COMMIT_ID".config -tar -czf "$DEPLOYDIR/$BUILD_NAME.linux.modules.tar.gz" -C "$MODULES_INSTALL_FOLDER/" ./ +tar -czf "$DEPLOYDIR/$KERNEL_COMMIT_ID.linux.modules.tar.gz" -C "$MODULES_INSTALL_FOLDER/" ./ $SCP_COMMAND "$DEPLOYDIR/$KERNEL_COMMIT_ID.bzImage" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_KERNEL_IMAGE" $SCP_COMMAND "$DEPLOYDIR/$KERNEL_COMMIT_ID.config" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_KERNEL_CONFIG" -$SCP_COMMAND "$DEPLOYDIR/$BUILD_NAME.linux.modules.tar.gz" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_LINUX_MODULES" +$SCP_COMMAND "$DEPLOYDIR/$KERNEL_COMMIT_ID.linux.modules.tar.gz" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_LINUX_MODULES" $SCP_COMMAND "$LINUX_PATH/Module.symvers" "$STORAGE_USER@$STORAGE_HOST:$STORAGE_KERNEL_MODULE_SYMVERS" diff --git a/scripts/lttng-baremetal-tests/build-modules.sh b/scripts/lttng-baremetal-tests/build-modules.sh index 1d658f5..04a8c0f 100644 --- a/scripts/lttng-baremetal-tests/build-modules.sh +++ b/scripts/lttng-baremetal-tests/build-modules.sh @@ -15,7 +15,7 @@ # along with this program. If not, see . echo 'modules-built.txt does not exist' -echo 'So we built them against the kernel' +echo 'So we build them against the kernel' $SCP_COMMAND "$STORAGE_USER@$STORAGE_HOST:$STORAGE_KERNEL_MODULE_SYMVERS" "$LINUX_PATH/Module.symvers" diff --git a/scripts/lttng-baremetal-tests/generate-properties-master.sh b/scripts/lttng-baremetal-tests/generate-properties-master.sh index 22111a8..ae1901a 100644 --- a/scripts/lttng-baremetal-tests/generate-properties-master.sh +++ b/scripts/lttng-baremetal-tests/generate-properties-master.sh @@ -23,7 +23,7 @@ if [ -n "${UST_BRANCH+x}" ]; then git checkout "$UST_BRANCH" popd - LTTNG_UST_COMMIT_ID="$(git --git-dir="$LTTNG_UST_PATH"/.git/ --work-tree="$LTTNG_UST_PATH" rev-parse HEAD)" + LTTNG_UST_COMMIT_ID="$(git --git-dir="$LTTNG_UST_PATH"/.git/ --work-tree="$LTTNG_UST_PATH" rev-parse --short HEAD)" echo "LTTNG_UST_PATH=$LTTNG_UST_PATH" >> properties.txt echo "LTTNG_UST_COMMIT_ID=$LTTNG_UST_COMMIT_ID" >> properties.txt fi @@ -38,9 +38,11 @@ echo "LINUX_PATH=$LINUX_PATH" >> properties.txt echo "LTTNG_MODULES_PATH=$LTTNG_MODULES_PATH" >> properties.txt echo "LTTNG_TOOLS_PATH=$LTTNG_TOOLS_PATH" >> properties.txt -KERNEL_COMMIT_ID="$(git --git-dir="$LINUX_PATH"/.git/ --work-tree="$LINUX_PATH" rev-parse HEAD)" -LTTNG_MODULES_COMMIT_ID="$(git --git-dir="$LTTNG_MODULES_PATH"/.git/ --work-tree="$LTTNG_MODULES_PATH" rev-parse HEAD)" -LTTNG_TOOLS_COMMIT_ID="$(git --git-dir="$LTTNG_TOOLS_PATH"/.git/ --work-tree="$LTTNG_TOOLS_PATH" rev-parse HEAD)" +KERNEL_COMMIT_ID="$(git --git-dir="$LINUX_PATH"/.git/ --work-tree="$LINUX_PATH" rev-parse --short HEAD)" +LTTNG_MODULES_COMMIT_ID="$(git --git-dir="$LTTNG_MODULES_PATH"/.git/ --work-tree="$LTTNG_MODULES_PATH" rev-parse --short HEAD)" +LTTNG_TOOLS_COMMIT_ID="$(git --git-dir="$LTTNG_TOOLS_PATH"/.git/ --work-tree="$LTTNG_TOOLS_PATH" rev-parse --short HEAD)" + +KERNEL_VERSION="$(make -s --directory=$LINUX_PATH kernelversion | sed 's/\./_/g; s/-/_/g';)" echo "KERNEL_COMMIT_ID=$KERNEL_COMMIT_ID" >> properties.txt echo "LTTNG_MODULES_COMMIT_ID=$LTTNG_MODULES_COMMIT_ID" >> properties.txt @@ -51,6 +53,6 @@ BASE_STORAGE_FOLDER="/storage/jenkins-lava/baremetal-tests" echo "BUILD_DEVICE=$BUILD_DEVICE" >> properties.txt echo "KGITREPO=git://git-mirror.internal.efficios.com/git/linux-stable.git" >> properties.txt echo "STORAGE_KERNEL_FOLDER=$BASE_STORAGE_FOLDER/kernel" >> properties.txt -echo "STORAGE_KERNEL_IMAGE=$BASE_STORAGE_FOLDER/kernel/$KERNEL_COMMIT_ID.$BUILD_DEVICE.bzImage" >> properties.txt -echo "STORAGE_LINUX_MODULES=$BASE_STORAGE_FOLDER/modules/linux/$KERNEL_COMMIT_ID.$BUILD_DEVICE.linux.modules.tar.gz" >> properties.txt -echo "STORAGE_LTTNG_MODULES=$BASE_STORAGE_FOLDER/modules/lttng/$KERNEL_COMMIT_ID-$LTTNG_MODULES_COMMIT_ID.$BUILD_DEVICE.lttng.modules.tar.gz" >> properties.txt +echo "STORAGE_KERNEL_IMAGE=$BASE_STORAGE_FOLDER/kernel/$KERNEL_VERSION-$KERNEL_COMMIT_ID.$BUILD_DEVICE.bzImage" >> properties.txt +echo "STORAGE_LINUX_MODULES=$BASE_STORAGE_FOLDER/modules/linux/$KERNEL_VERSION-$KERNEL_COMMIT_ID.$BUILD_DEVICE.linux.modules.tar.gz" >> properties.txt +echo "STORAGE_LTTNG_MODULES=$BASE_STORAGE_FOLDER/modules/lttng/$KERNEL_VERSION-$KERNEL_COMMIT_ID-$LTTNG_MODULES_COMMIT_ID.$BUILD_DEVICE.lttng.modules.tar.gz" >> properties.txt diff --git a/scripts/lttng-baremetal-tests/generate-properties-slave.sh b/scripts/lttng-baremetal-tests/generate-properties-slave.sh index 017f1f6..fdd45ca 100644 --- a/scripts/lttng-baremetal-tests/generate-properties-slave.sh +++ b/scripts/lttng-baremetal-tests/generate-properties-slave.sh @@ -42,8 +42,8 @@ echo "LTTNG_MODULES_COMMIT_ID=$LTTNG_MODULES_COMMIT_ID" >> properties.txt echo "BUILD_NAME=$BUILD_NAME" >> properties.txt echo "BUILD_DEVICE=$BUILD_DEVICE" >> properties.txt -echo "STORAGE_KERNEL_MODULE_SYMVERS=$STORAGE_KERNEL_FOLDER/$KERNEL_COMMIT_ID.$BUILD_DEVICE.symvers" >>properties.txt -echo "STORAGE_KERNEL_CONFIG=$STORAGE_KERNEL_FOLDER/$KERNEL_COMMIT_ID.$BUILD_DEVICE.config" >> properties.txt +echo "STORAGE_KERNEL_MODULE_SYMVERS=$STORAGE_KERNEL_FOLDER/symvers/$KERNEL_COMMIT_ID.$BUILD_DEVICE.symvers" >>properties.txt +echo "STORAGE_KERNEL_CONFIG=$STORAGE_KERNEL_FOLDER/config/$KERNEL_COMMIT_ID.$BUILD_DEVICE.config" >> properties.txt echo "STORAGE_HOST=storage01.internal.efficios.com" >> properties.txt echo "STORAGE_USER=jenkins-lava" >> properties.txt -- 2.34.1