Fuego Digest, Vol 9, Issue 45
A message that is not in the archive (sent off-list or not yet received): [email protected]
Thanks Daniel for the patches.
I will try them out and let you know.
Regards,
Dhinakar
Quoted 250 lines · On Tue, Apr 18, 2017 at 5:30 PM, <[email protected]>…
Send Fuego mailing list submissions to
[email protected]To subscribe or unsubscribe via the World Wide Web, visit
https://lists.linuxfoundation.org/mailman/listinfo/fuego
or, via email, send a message with subject or body 'help' to
[email protected]You can reach the person managing the list at
[email protected]When replying, please edit your Subject line so it is more specific than "Re: Contents of Fuego digest..."
Today's Topics:
1. [PATCH 3/4] crosstool: allow installing different architectures (Daniel Sangorrin)
2. [PATCH 2/2] tests: add Functional.kernel_build test (Daniel Sangorrin)----------------------------------------------------------------------
Message: 1
Date: Tue, 18 Apr 2017 17:41:49 +0900
From: Daniel Sangorrin <[email protected]>
To: [email protected]
Subject: [Fuego] [PATCH 3/4] crosstool: allow installing different
architectures
Message-ID:<[email protected]>Before only armhf was available, now we can install arm64 armel armhf mips mipsel powerpc ppc64el toolchains
Signed-off-by Daniel Sangorrin <[email protected]>--- fuego-ro/toolchains/install_armhf_toolchain.sh | 6 ------ fuego-ro/toolchains/install_cross_toolchain.sh | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644 fuego-ro/toolchains/install_armhf_toolchain.sh create mode 100755 fuego-ro/toolchains/install_cross_toolchain.shfuego-ro/toolchains/install_armhf_toolchain.sh deleted +0
-2@@ -1,6 +0,0 @@ -#!/bin/bash -echo deb http://emdebian.org/tools/debian/ jessie main >
/etc/apt/sources.list.d/crosstools.listfuego-ro/toolchains/install_armhf_toolchain.sh deleted +0
-2-dpkg --add-architecture armhf -curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key |sudo apt-key add -
fuego-ro/toolchains/install_armhf_toolchain.sh deleted +0
-2-DEBIAN_FRONTEND=noninteractive apt-get update -DEBIAN_FRONTEND=noninteractive apt-get -yV installcrossbuild-essential-armhf
fuego-ro/toolchains/install_cross_toolchain.sh new file +10
-0@@ -0,0 +1,14 @@ +#!/bin/bash +# $1: architecture (e.g.: arm64 armel armhf mips mipsel powerpc ppc64el) + +if [ -z ${1+x} ]; then + ARCH=armhf +else + ARCH=$1 +fi + +echo deb http://emdebian.org/tools/debian/ jessie main >
/etc/apt/sources.list.d/crosstools.listfuego-ro/toolchains/install_cross_toolchain.sh new file +2
-0+dpkg --add-architecture $ARCH +curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key |sudo apt-key add -
fuego-ro/toolchains/install_cross_toolchain.sh new file +2
-0+DEBIAN_FRONTEND=noninteractive apt-get update +DEBIAN_FRONTEND=noninteractive apt-get -yV installcrossbuild-essential-$ARCH
--
2.7.4------------------------------
Message: 2
Date: Tue, 18 Apr 2017 17:41:48 +0900
From: Daniel Sangorrin <[email protected]>
To: [email protected]
Subject: [Fuego] [PATCH 2/2] tests: add Functional.kernel_build test Message-ID:<[email protected]>Easy to automatize kernel builds for different architectures. There are a few TODOs for corner cases but it works.
Next I want to add a deploy option so that we can put the resulting kernel on a tftp folder or give it to lava.
Signed-off-by Daniel Sangorrin <[email protected]>--- .../Functional.kernel_build.spec | 18 +++++ .../tests/Functional.kernel_build/kernel_build.sh | 80 ++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 engine/tests/Functional.kernel_build/Functional. kernel_build.spec create mode 100755 engine/tests/Functional.kernel_build/kernel_build.shengine/tests/Functional.kernel_build/Functional.kernel_build.spec new file +18
-0@@ -0,0 +1,18 @@ +{ + "testName": "Functional.kernel_build", + "specs": + [ + { + "name": "cip-x86", + "repo": "https://github.com/cip-project/linux-cip.git" + }, + { + "name": "cip-arm64", + "repo": "https://github.com/cip-project/linux-cip.git", + "platform": "aarch64", + "arch": "arm64", + "params": "-j8 Image dtbs modules", + "regex_p": "^ OBJCOPY arch/arm64/boot/Image" + } + ] +}engine/tests/Functional.kernel_build/kernel_build.sh new file +22
-0@@ -0,0 +1,80 @@ +function test_pre_check { + echo "Doing a pre_check" + # FIXTHIS: if making uImage, check for mkimage +} + +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 totrue
engine/tests/Functional.kernel_build/kernel_build.sh new file +2
-0+ if [ ! -d "$FOLDER" ]; then + echo "Cloning $FUNCTIONAL_KERNEL_BUILD_REPO:$FUNCTIONAL_KERNEL_BUILD_BRANCH"
engine/tests/Functional.kernel_build/kernel_build.sh new file +22
-0+ 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" + fi + + if [ -z ${FUNCTIONAL_KERNEL_BUILD_CONFIG+x} ]; then + FUNCTIONAL_KERNEL_BUILD_CONFIG="defconfig" + fi + echo "Configuring kernel with $FUNCTIONAL_KERNEL_BUILD_CONFIG" + make ARCH=$FUNCTIONAL_KERNEL_BUILD_ARCH $FUNCTIONAL_KERNEL_BUILD_CONFIG
engine/tests/Functional.kernel_build/kernel_build.sh new file +15
-0+ + # Building + echo "Building Kernel" + if [ -z ${FUNCTIONAL_KERNEL_BUILD_PARAMS+x} ]; then + $FUNCTIONAL_KERNEL_BUILD_PARAMS="-j4 bzImage modules" + fi + + if [ ! -z ${FUNCTIONAL_KERNEL_BUILD_PLATFORM+x} ]; then + OLD_PLATFORM=$PLATFORM + PLATFORM=$FUNCTIONAL_KERNEL_BUILD_PLATFORM + source $FUEGO_RO/toolchains/tools.sh + PLATFORM=$OLD_PLATFORM + fi + + make ARCH=$FUNCTIONAL_KERNEL_BUILD_ARCH $FUNCTIONAL_KERNEL_BUILD_PARAMSQuoted 1 line
build.log 2>&1 || true
engine/tests/Functional.kernel_build/kernel_build.sh new file +19
-1+ + report "cat build.log" +} + +function test_deploy { + echo "Deploying kernel" + # FIXTHIS: copy to tftp folder for lava etc.. +} + +function test_processing { + echo "Processing kernel build log" + if [ -z ${FUNCTIONAL_KERNEL_BUILD_REGEX_P+x} ]; then + log_compare "$TESTDIR" "1" "^Kernel: arch/.* is ready" "p" + else + log_compare "$TESTDIR" "1" "$FUNCTIONAL_KERNEL_BUILD_REGEX_P" "p" + fi +} + +. $FUEGO_CORE/engine/scripts/functional.sh --2.7.4
------------------------------
_______________________________________________
Fuego mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/fuegoEnd of Fuego Digest, Vol 9, Issue 45
************************************
Quoted 2 lines
Thanks Daniel for the patches.
I will try them out and let you know.
Thanks Dhinakar.
The current specs are set for the CIP kernel and the mainstream kernel, but you can add new specs with a different git URL or branch if you want.
By the way, you can now try the LTP test in two phases (build, run) on my 'next' branch (see the other e-mails) now.
Regards,
Daniel
Quoted 246 lines
On Tue, Apr 18, 2017 at 5:30 PM, <[email protected] <mailto:[email protected]> > wrote:
Send Fuego mailing list submissions to
[email protected] <mailto:[email protected]>To subscribe or unsubscribe via the World Wide Web, visit
https://lists.linuxfoundation.org/mailman/listinfo/fuego <https://lists.linuxfoundation.org/mailman/listinfo/fuego>
or, via email, send a message with subject or body 'help' to
[email protected] <mailto:[email protected]>You can reach the person managing the list at
[email protected] <mailto:[email protected]>When replying, please edit your Subject line so it is more specific than "Re: Contents of Fuego digest..."
Today's Topics:
1. [PATCH 3/4] crosstool: allow installing different architectures (Daniel Sangorrin)
2. [PATCH 2/2] tests: add Functional.kernel_build test (Daniel Sangorrin)----------------------------------------------------------------------
Message: 1
Date: Tue, 18 Apr 2017 17:41:49 +0900
From: Daniel Sangorrin <[email protected] <mailto:[email protected]> >
To: [email protected] <mailto:[email protected]>
Subject: [Fuego] [PATCH 3/4] crosstool: allow installing different
architectures
Message-ID:
<[email protected] <mailto:1492504910-15293-6-git-send-email-
[email protected]> >Before only armhf was available, now we can install arm64 armel armhf mips mipsel powerpc ppc64el toolchains
Signed-off-by Daniel Sangorrin <[email protected] <mailto:[email protected]> >---
fuego-ro/toolchains/install_armhf_toolchain.sh| 6 ------fuego-ro/toolchains/install_cross_toolchain.sh| 14 ++++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644fuego-ro/toolchains/install_armhf_toolchain.shcreate mode 100755fuego-ro/toolchains/install_cross_toolchain.shdiff --git
a/fuego-ro/toolchains/install_armhf_toolchain.shb/fuego-ro/toolchains/install_armhf_toolchain.shdeleted file mode 100644
index d650384..0000000
---a/fuego-ro/toolchains/install_armhf_toolchain.sh
+++/dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-echo deb http://emdebian.org/tools/debian/ <http://emdebian.org/tools/debian/> jessie main >/etc/apt/sources.list.d/crosstools.list-dpkg --add-architecture armhf -curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key <http://emdebian.org/tools/debian/emdebian- toolchain-archive.key> | sudo apt-key add - -DEBIAN_FRONTEND=noninteractive apt-get update -DEBIAN_FRONTEND=noninteractive apt-get -yV install crossbuild-essential-armhf diff --git a/fuego-ro/toolchains/install_cross_toolchain.sh b/fuego-ro/toolchains/install_cross_toolchain.sh new file mode 100755 index 0000000..eb74f31 --- /dev/null +++ b/fuego-ro/toolchains/install_cross_toolchain.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# $1: architecture (e.g.: arm64 armel armhf mips mipsel powerpc ppc64el) + +if [ -z ${1+x} ]; then + ARCH=armhf +else + ARCH=$1 +fi + +echo deb http://emdebian.org/tools/debian/ <http://emdebian.org/tools/debian/> jessie main > /etc/apt/sources.list.d/crosstools.list +dpkg --add-architecture $ARCH +curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key <http://emdebian.org/tools/debian/emdebian- toolchain-archive.key> | sudo apt-key add - +DEBIAN_FRONTEND=noninteractive apt-get update +DEBIAN_FRONTEND=noninteractive apt-get -yV install crossbuild-essential-$ARCH -- 2.7.4 ------------------------------ Message: 2 Date: Tue, 18 Apr 2017 17:41:48 +0900 From: Daniel Sangorrin <[email protected] <mailto:[email protected]> > To: [email protected] <mailto:[email protected]> Subject: [Fuego] [PATCH 2/2] tests: add Functional.kernel_build test Message-ID: <[email protected] <mailto:1492504910-15293-5-git-send-email-Easy to automatize kernel builds for different architectures. There are a few TODOs for corner cases but it works.
Next I want to add a deploy option so that we can put the resulting kernel on a tftp folder or give it to lava.
Signed-off-by Daniel Sangorrin <[email protected] <mailto:[email protected]> >---
.../Functional.kernel_build.spec | 18 +++++
.../tests/Functional.kernel_build/kernel_build.sh| 80 ++++++++++++++++++++++ 2 files changed, 98 insertions(+)
create mode 100644 engine/tests/Functional.kernel_build/Functional.kernel_build.spec create mode 100755engine/tests/Functional.kernel_build/kernel_build.shdiff --git a/engine/tests/Functional.kernel_build/Functional.kernel_build.spec
b/engine/tests/Functional.kernel_build/Functional.kernel_build.spec
new file mode 100644
index 0000000..39914a8
---/dev/null
+++ b/engine/tests/Functional.kernel_build/Functional.kernel_build.spec
@@ -0,0 +1,18 @@
+{
+ "testName": "Functional.kernel_build",
+ "specs":
+ [
+ {
+ "name": "cip-x86",
+ "repo": "https://github.com/cip-project/linux-cip.git <https://github.com/cip-project/linux-cip.git> "
+ },
+ {
+ "name": "cip-arm64",
+ "repo": "https://github.com/cip-project/linux-cip.git <https://github.com/cip-project/linux-cip.git> ",
+ "platform": "aarch64",
+ "arch": "arm64",
+ "params": "-j8 Image dtbs modules",
+ "regex_p": "^ OBJCOPYarch/arm64/boot/Image"
+ }
+ ]
+}
diff --gita/engine/tests/Functional.kernel_build/kernel_build.shb/engine/tests/Functional.kernel_build/kernel_build.shnew file mode 100755
index 0000000..285d5ba
---/dev/null
+++b/engine/tests/Functional.kernel_build/kernel_build.sh
@@ -0,0 +1,80 @@
+functiontest_pre_check{
+ echo "Doing apre_check"
+ # FIXTHIS: if making uImage, check for mkimage
+}
+
+functiontest_build{
+ FOLDER="$(basename "$FUNCTIONAL_KERNEL_BUILD_REPO" .git)"
+
+ # Clone if no tarball was defined
+ if [ -z ${tarball+x} ]; then
+assert_defineFUNCTIONAL_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"
+ fi
+
+ if [ -z ${FUNCTIONAL_KERNEL_BUILD_CONFIG+x} ]; then
+ FUNCTIONAL_KERNEL_BUILD_CONFIG="defconfig"
+ fi
+ echo "Configuring kernel with $FUNCTIONAL_KERNEL_BUILD_CONFIG"
+ make ARCH=$FUNCTIONAL_KERNEL_BUILD_ARCH $FUNCTIONAL_KERNEL_BUILD_CONFIG
+
+ # Building
+ echo "Building Kernel"
+ if [ -z ${FUNCTIONAL_KERNEL_BUILD_PARAMS+x} ]; then
+ $FUNCTIONAL_KERNEL_BUILD_PARAMS="-j4 bzImage modules"
+ fi
+
+ if [ ! -z ${FUNCTIONAL_KERNEL_BUILD_PLATFORM+x} ]; then
+ OLD_PLATFORM=$PLATFORM
+ PLATFORM=$FUNCTIONAL_KERNEL_BUILD_PLATFORM
+ source$FUEGO_RO/toolchains/tools.sh
+ PLATFORM=$OLD_PLATFORM
+ fi
+
+ make ARCH=$FUNCTIONAL_KERNEL_BUILD_ARCH $FUNCTIONAL_KERNEL_BUILD_PARAMS > build.log 2>&1 || true
+
+ report "cat build.log"
+}
+
+functiontest_deploy{
+ echo "Deploying kernel"
+ # FIXTHIS: copy to tftp folder for lava etc..
+}
+
+functiontest_processing{
+ echo "Processing kernel build log"
+ if [ -z ${FUNCTIONAL_KERNEL_BUILD_REGEX_P+x} ]; then
+log_compare"$TESTDIR" "1" "^Kernel:arch/.*is ready" "p"
+ else
+log_compare"$TESTDIR" "1" "$FUNCTIONAL_KERNEL_BUILD_REGEX_P" "p"
+ fi
+}
+
+.$FUEGO_CORE/engine/scripts/functional.sh
--
2.7.4------------------------------
_______________________________________________
Fuego mailing list
[email protected] <mailto:[email protected]>
https://lists.linuxfoundation.org/mailman/listinfo/fuego <https://lists.linuxfoundation.org/mailman/listinfo/fuego>End of Fuego Digest, Vol 9, Issue 45
************************************
Thank Daniel for the LTP split release. I wanted to try it but still facing issues in making serial connectivity work. Do you have any clue regarding any prerequisites that Iam missing like test folder, permission etc.?
Regarding the kernel I will try with our development git. Where to set the cross compiler path kept in Ubuntu host?
Regards,
Dhinakar
Quoted 2 lines · Daniel Sangorrin
Thanks Daniel for the patches.
I will try them out and let you know.
Thanks Dhinakar.
The current specs are set for the CIP kernel and the mainstream kernel, but you can add new specs with a different git URL or branch if you want.
By the way, you can now try the LTP test in two phases (build, run) on my 'next' branch (see the other e-mails) now.
Regards,
Daniel
Quoted 1 line
On Tue, Apr 18, 2017 at 5:30 PM, <[email protected]
<mailto:[email protected]> >
Quoted 5 lines
wrote:
Send Fuego mailing list submissions to
[email protected] <mailto:fuego@lists.
linuxfoundation.org>
Quoted 3 lines
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.linuxfoundation.org/mailman/listinfo/fuego <
https://lists.linuxfoundation.org/mailman/listinfo/fuego>
Quoted 2 lines
or, via email, send a message with subject or body 'help' to
[email protected] <mailto:
Quoted 3 lines
You can reach the person managing the list at
[email protected] <mailto:
Quoted 7 lines
When replying, please edit your Subject line so it is more specific than "Re: Contents of Fuego digest..."
Today's Topics:
Quoted 7 lines
1. [PATCH 3/4] crosstool: allow installing different architectures (Daniel Sangorrin)
2. [PATCH 2/2] tests: add Functional.kernel_build test (Daniel Sangorrin)------------------------------------------------------------
----------
Quoted 4 lines
Message: 1
Date: Tue, 18 Apr 2017 17:41:49 +0900
From: Daniel Sangorrin <[email protected] <mailto:
Quoted 1 line
To: [email protected] <mailto:fuego@lists.
linuxfoundation.org>
Quoted 4 lines
Subject: [Fuego] [PATCH 3/4] crosstool: allow installing different
architectures
Message-ID:
<1492504910-15293-6-git-send-email-daniel.sangorrin@
toshiba.co.jp <mailto:1492504910-15293-6-git-send-email-
Quoted 6 lines
Before only armhf was available, now we can install arm64 armel armhf mips mipsel powerpc ppc64el toolchains
Signed-off-by Daniel Sangorrin <[email protected]
<mailto:[email protected]> >
Quoted 8 lines
---
fuego-ro/toolchains/install_armhf_toolchain.sh| 6 ------fuego-ro/toolchains/install_cross_toolchain.sh| 14 ++++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644fuego-ro/toolchains/install_armhf_toolchain.shcreate mode 100755fuego-ro/toolchains/install_cross_toolchain.shdiff --git
a/fuego-ro/toolchains/install_armhf_toolchain.sh
b/fuego-ro/toolchains/install_armhf_toolchain.sh
Quoted 7 lines
deleted file mode 100644
index d650384..0000000
--- a/fuego-ro/toolchains/install_armhf_toolchain.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-echo deb http://emdebian.org/tools/debian/ <http://emdebian.org/tools/debian/> jessie main >
Quoted 3 lines
/etc/apt/sources.list.d/crosstools.list-dpkg --add-architecture armhf -curl http://emdebian.org/tools/debian/emdebian-toolchain-
archive.key <http://emdebian.org/tools/debian/emdebian-
Quoted 3 lines
toolchain-archive.key> | sudo apt-key add -
-DEBIAN_FRONTEND=noninteractive apt-get update -DEBIAN_FRONTEND=noninteractive apt-get -yV install
crossbuild-essential-armhf
Quoted 1 line
diff --git a/fuego-ro/toolchains/install_cross_toolchain.sh
b/fuego-ro/toolchains/install_cross_toolchain.sh
Quoted 7 lines
new file mode 100755
index 0000000..eb74f31
--- /dev/null
+++ b/fuego-ro/toolchains/install_cross_toolchain.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# $1: architecture (e.g.: arm64 armel armhf mips mipsel powerpcppc64el)
Quoted 8 lines
+
+if [ -z ${1+x} ]; then
+ ARCH=armhf
+else
+ ARCH=$1
+fi
+
+echo deb http://emdebian.org/tools/debian/ <http://emdebian.org/tools/debian/> jessie main >
Quoted 3 lines
/etc/apt/sources.list.d/crosstools.list+dpkg --add-architecture $ARCH +curl http://emdebian.org/tools/debian/emdebian-toolchain-
archive.key <http://emdebian.org/tools/debian/emdebian-
Quoted 3 lines
toolchain-archive.key> | sudo apt-key add -
+DEBIAN_FRONTEND=noninteractive apt-get update +DEBIAN_FRONTEND=noninteractive apt-get -yV install
crossbuild-essential-$ARCH
Quoted 11 lines
--
2.7.4
------------------------------
Message: 2
Date: Tue, 18 Apr 2017 17:41:48 +0900
From: Daniel Sangorrin <[email protected] <mailto:Quoted 1 line
To: [email protected] <mailto:fuego@lists.
linuxfoundation.org>
Quoted 3 lines
Subject: [Fuego] [PATCH 2/2] tests: add Functional.kernel_build test Message-ID:
<1492504910-15293-5-git-send-email-daniel.sangorrin@
toshiba.co.jp <mailto:1492504910-15293-5-git-send-email-
Quoted 9 lines
Easy to automatize kernel builds for different architectures. There are a few TODOs for corner cases but it works.
Next I want to add a deploy option so that we can put the resulting kernel on a tftp folder or give it to lava.
Signed-off-by Daniel Sangorrin <[email protected]
<mailto:[email protected]> >
Quoted 3 lines
---
.../Functional.kernel_build.spec | 18 +++++
.../tests/Functional.kernel_build/kernel_build.sh| 80
++++++++++++++++++++++
Quoted 2 lines
2 files changed, 98 insertions(+)create mode 100644 engine/tests/Functional.kernel_build/Functional.
kernel_build.spec
Quoted 1 line
create mode 100755 engine/tests/Functional.
kernel_build/kernel_build.sh
Quoted 2 lines
diff --git a/engine/tests/Functional.kernel_build/Functional.kernel_build.spec
Quoted 5 lines
b/engine/tests/Functional.kernel_build/Functional.kernel_build.spec
new file mode 100644 index 0000000..39914a8 --- /dev/null +++ b/engine/tests/Functional.kernel_build/Functional.
kernel_build.spec
Quoted 8 lines
@@ -0,0 +1,18 @@
+{
+ "testName": "Functional.kernel_build",
+ "specs":
+ [
+ {
+ "name": "cip-x86",
+ "repo": "https://github.com/cip-project/linux-cip.git <
https://github.com/cip-project/linux-cip.git> "
Quoted 4 lines
+ },
+ {
+ "name": "cip-arm64",
+ "repo": "https://github.com/cip-project/linux-cip.git <
https://github.com/cip-project/linux-cip.git> ",
Quoted 8 lines
+ "platform": "aarch64", + "arch": "arm64", + "params": "-j8 Image dtbs modules", + "regex_p": "^ OBJCOPY arch/arm64/boot/Image"+ }
+ ]
+}
diff --gita/engine/tests/Functional.kernel_build/kernel_build.sh
b/engine/tests/Functional.kernel_build/kernel_build.sh
Quoted 16 lines
new file mode 100755
index 0000000..285d5ba
---/dev/null
+++b/engine/tests/Functional.kernel_build/kernel_build.sh@@ -0,0 +1,80 @@
+functiontest_pre_check{
+ echo "Doing apre_check"
+ # FIXTHIS: if making uImage, check for mkimage
+}
+
+functiontest_build{
+ FOLDER="$(basename "$FUNCTIONAL_KERNEL_BUILD_REPO" .git)"
+
+ # Clone if no tarball was defined
+ if [ -z ${tarball+x} ]; then
+assert_defineFUNCTIONAL_KERNEL_BUILD_REPO
Quoted 8 lines
+
+ # 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
Quoted 3 lines
+ fi
+
+ # FIXTHIS: the folder gets removed with the rebuild flag
set to true
Quoted 2 lines
+ if [ ! -d "$FOLDER" ]; then
+ echo "Cloning $FUNCTIONAL_KERNEL_BUILD_REPO:
$FUNCTIONAL_KERNEL_BUILD_BRANCH"
Quoted 14 lines
+ 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
Quoted 8 lines
+ FUNCTIONAL_KERNEL_BUILD_ARCH="x86_64"
+ fi
+
+ if [ -z ${FUNCTIONAL_KERNEL_BUILD_CONFIG+x} ]; then
+ FUNCTIONAL_KERNEL_BUILD_CONFIG="defconfig"
+ fi
+ echo "Configuring kernel with $FUNCTIONAL_KERNEL_BUILD_CONFIG"
+ make ARCH=$FUNCTIONAL_KERNEL_BUILD_ARCH
$FUNCTIONAL_KERNEL_BUILD_CONFIG
Quoted 7 lines
+
+ # Building
+ echo "Building Kernel"
+ if [ -z ${FUNCTIONAL_KERNEL_BUILD_PARAMS+x} ]; then
+ $FUNCTIONAL_KERNEL_BUILD_PARAMS="-j4 bzImage modules"
+ fi
+
Quoted 8 lines
+ if [ ! -z ${FUNCTIONAL_KERNEL_BUILD_PLATFORM+x} ]; then
+ OLD_PLATFORM=$PLATFORM
+ PLATFORM=$FUNCTIONAL_KERNEL_BUILD_PLATFORM
+ source$FUEGO_RO/toolchains/tools.sh
+ PLATFORM=$OLD_PLATFORM
+ fi
+
+ make ARCH=$FUNCTIONAL_KERNEL_BUILD_ARCH
$FUNCTIONAL_KERNEL_BUILD_PARAMS > build.log 2>&1 || true
Quoted 7 lines
+
+ report "cat build.log"
+}
+
+functiontest_deploy{
+ echo "Deploying kernel"
+ # FIXTHIS: copy to tftp folder for lava etc..
Quoted 8 lines
+}
+
+functiontest_processing{
+ echo "Processing kernel build log"
+ if [ -z ${FUNCTIONAL_KERNEL_BUILD_REGEX_P+x} ]; then
+log_compare"$TESTDIR" "1" "^Kernel:arch/.*is ready" "p"
+ else
+log_compare"$TESTDIR" "1" "$FUNCTIONAL_KERNEL_BUILD_REGEX_P"
"p"
Quoted 10 lines
+ fi
+}
+
+. $FUEGO_CORE/engine/scripts/functional.sh
--
2.7.4Quoted 5 lines
------------------------------
_______________________________________________
Fuego mailing list
[email protected] <mailto:Fuego@lists.linuxfoundation.org>
Quoted 1 line
https://lists.linuxfoundation.org/mailman/listinfo/fuego>
Quoted 6 lines
End of Fuego Digest, Vol 9, Issue 45
************************************