[Fuego] [PATCH 5/6] kernel_build: rely on the new git functionality
Daniel Sangorrin
daniel.sangorrin at toshiba.co.jp
Wed May 17 01:13:05 UTC 2017
Instead of cloning the source code by ourselves rely on the
more generic method that is now available.
Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
engine/tests/Functional.kernel_build/fuego_test.sh | 30 ----------------------
engine/tests/Functional.kernel_build/spec.json | 24 ++++++++++++++---
2 files changed, 21 insertions(+), 33 deletions(-)
diff --git a/engine/tests/Functional.kernel_build/fuego_test.sh b/engine/tests/Functional.kernel_build/fuego_test.sh
index d4b13ae..4ca5a51 100755
--- a/engine/tests/Functional.kernel_build/fuego_test.sh
+++ b/engine/tests/Functional.kernel_build/fuego_test.sh
@@ -4,36 +4,6 @@ function test_pre_check {
}
function test_build {
- FOLDER="$(basename "$FUNCTIONAL_KERNEL_BUILD_REPO" .git)"
-
- # Clone if no tarball was defined
- if [ -z ${tarball+x} ]; then
- assert_define FUNCTIONAL_KERNEL_BUILD_REPO
-
- # Set branch or tag (default: "master" branch)
- if [ -z ${FUNCTIONAL_KERNEL_BUILD_TAG+x} ]; then
- if [ -z ${FUNCTIONAL_KERNEL_BUILD_BRANCH+x} ]; then
- FUNCTIONAL_KERNEL_BUILD_BRANCH="master"
- fi
- else
- FUNCTIONAL_KERNEL_BUILD_BRANCH=$FUNCTIONAL_KERNEL_BUILD_TAG
- fi
-
- # FIXTHIS: the folder gets removed with the rebuild flag set to true
- if [ ! -d "$FOLDER" ]; then
- echo "Cloning $FUNCTIONAL_KERNEL_BUILD_REPO:$FUNCTIONAL_KERNEL_BUILD_BRANCH"
- git clone --depth 1 "$FUNCTIONAL_KERNEL_BUILD_REPO" \
- --branch $FUNCTIONAL_KERNEL_BUILD_BRANCH
- cd "$FOLDER"
- else
- cd "$FOLDER"
- if [ -z ${FUNCTIONAL_KERNEL_BUILD_TAG+x} ]; then
- make mrproper
- git pull
- fi
- fi
- fi
-
# Configuration
if [ -z ${FUNCTIONAL_KERNEL_BUILD_ARCH+x} ]; then
FUNCTIONAL_KERNEL_BUILD_ARCH="x86_64"
diff --git a/engine/tests/Functional.kernel_build/spec.json b/engine/tests/Functional.kernel_build/spec.json
index 47a6da1..a2e9cf3 100644
--- a/engine/tests/Functional.kernel_build/spec.json
+++ b/engine/tests/Functional.kernel_build/spec.json
@@ -2,16 +2,34 @@
"testName": "Functional.kernel_build",
"specs": {
"default": {
- "repo": "https://github.com/torvalds/linux.git"
+ "gitrepo": "https://github.com/torvalds/linux.git"
+ },
+ "stable-310y": {
+ "gitrepo": "https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable",
+ "gitref": "linux-3.10.y"
+ },
+ "dirty-cow": {
+ "gitrepo": "https://github.com/torvalds/linux.git",
+ "gitref": "19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619"
},
"cip-x86": {
- "repo": "https://github.com/cip-project/linux-cip.git"
+ "gitrepo": "https://github.com/cip-project/linux-cip.git"
},
"cip-arm64": {
- "repo": "https://github.com/cip-project/linux-cip.git",
+ "gitrepo": "https://github.com/cip-project/linux-cip.git",
+ "platform": "aarch64",
+ "arch": "arm64",
+ "params": "-j8 Image dtbs modules",
+ "regex_p": "^ OBJCOPY arch/arm64/boot/Image"
+ },
+ "template": {
+ "gitrepo": "https://xxx/yyy.git",
+ "gitref": "my_tag_branch_or_commit_id",
"platform": "aarch64",
"arch": "arm64",
+ "config": "defconfig",
"params": "-j8 Image dtbs modules",
+ "deploy": "/var/lib/tftp/",
"regex_p": "^ OBJCOPY arch/arm64/boot/Image"
}
}
--
2.7.4
More information about the Fuego
mailing list