diff mbox

[kvm-unit-tests,02/12] scripts/mkstandalone: fix ARCH

Message ID 1453209851-27760-3-git-send-email-rkrcmar@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Radim Krčmář Jan. 19, 2016, 1:24 p.m. UTC
ARCH depends on the built image, not on target's arch.
Use the value from config.mak.

Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
---
 scripts/mkstandalone.sh | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Paolo Bonzini Jan. 19, 2016, 2:32 p.m. UTC | #1
On 19/01/2016 14:24, Radim Kr?má? wrote:
> ARCH depends on the built image, not on target's arch.
> Use the value from config.mak.
> 
> Signed-off-by: Radim Kr?má? <rkrcmar@redhat.com>
> ---
>  scripts/mkstandalone.sh | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
> index 5f9ef146208e..47d6e279d212 100755
> --- a/scripts/mkstandalone.sh
> +++ b/scripts/mkstandalone.sh
> @@ -53,17 +53,8 @@ function mkstandalone()
>  
>  	echo "#!/bin/sh"
>  
> -if [ "$arch" ]; then
> -	cat <<EOF
> -ARCH=\`uname -m | sed -e s/i.86/i386/ | sed -e 's/arm.*/arm/'\`
> -[ "\$ARCH" = "aarch64" ] && ARCH="arm64"
> -if [ "\$ARCH" != "$arch" ]; then
> -	echo "skip $testname ($arch only)" 1>&2
> -	exit 1
> -fi
> +	cat config.mak | grep '^ARCH='

Useless use of cat... so far nothing that I cannot fix myself.

Paolo

>  
> -EOF
> -fi
>  if [ "$check" ]; then
>  	cat <<EOF
>  for param in $check; do
> 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
index 5f9ef146208e..47d6e279d212 100755
--- a/scripts/mkstandalone.sh
+++ b/scripts/mkstandalone.sh
@@ -53,17 +53,8 @@  function mkstandalone()
 
 	echo "#!/bin/sh"
 
-if [ "$arch" ]; then
-	cat <<EOF
-ARCH=\`uname -m | sed -e s/i.86/i386/ | sed -e 's/arm.*/arm/'\`
-[ "\$ARCH" = "aarch64" ] && ARCH="arm64"
-if [ "\$ARCH" != "$arch" ]; then
-	echo "skip $testname ($arch only)" 1>&2
-	exit 1
-fi
+	cat config.mak | grep '^ARCH='
 
-EOF
-fi
 if [ "$check" ]; then
 	cat <<EOF
 for param in $check; do