Checkout kernel only if necessary
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 5 Nov 2018 20:18:46 +0000 (15:18 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 5 Nov 2018 20:18:46 +0000 (15:18 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
jobs/system-tests.yaml
scripts/system-tests/check-build-needs.sh

index 9a33e6f9bc7bdb7c67397098529c13687f4da28f..2a1ed5bacd6d53a4051a3e585c132b39e531f4ec 100644 (file)
       - git:
           url: https://github.com/lttng/lttng-ci
           basedir: src/lttng-ci/
-      - git:
-          url : $KGITREPO
-          basedir: src/linux/
-          branches:
-            - $KERNEL_COMMIT_ID
       - git:
           url : $LTTNG_MODULES_REPO
           basedir: src/lttng-modules/
index 6602d398f25586ca34d2f5e1ee47ecc27b23b68a..cf51ab2ace0df6a14443ad910c5a4fd642bea679 100644 (file)
@@ -49,6 +49,13 @@ set -e
 # We need to fetch the kernel source and lttng-modules to build either the
 # kernel or modules
 if [ $NEED_MODULES_BUILD -eq 1 ] || [ $NEED_KERNEL_BUILD -eq 1 ] ; then
+  mkdir -p "$LINUX_PATH"
+  pushd "$LINUX_PATH"
+  git init
+  git remote add origin "$KGITREPO"
+  git fetch --depth 1 origin "$KERNEL_COMMIT_ID"
+  git checkout FETCH_HEAD
+  popd
 
   cp src/lttng-ci/lava/kernel/vanilla/x86_64_server.config "$LINUX_PATH/.config"
   make --directory="$LINUX_PATH" olddefconfig
This page took 0.024009 seconds and 4 git commands to generate.