diff mbox

[RFC,3/4] tests: Add mingw 32/64 cross compiling

Message ID 1454510164-6278-4-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng Feb. 3, 2016, 2:36 p.m. UTC
Only fedora22 has the required toolchain so it's not run elsewhere.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/docker/mingw.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100755 tests/docker/mingw.sh

Comments

Stefan Weil Feb. 3, 2016, 3:08 p.m. UTC | #1
Am 03.02.2016 um 15:36 schrieb Fam Zheng:
> Only fedora22 has the required toolchain so it's not run elsewhere.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/docker/mingw.sh | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  create mode 100755 tests/docker/mingw.sh
> 
> diff --git a/tests/docker/mingw.sh b/tests/docker/mingw.sh
> new file mode 100755
> index 0000000..0f103cd
> --- /dev/null
> +++ b/tests/docker/mingw.sh
> @@ -0,0 +1,14 @@
> +#!/bin/bash
> +
> +if [ "$IMAGE_TAG" != "fedora22" ]; then
> +    echo "Mingw test skipped"
> +    exit 0
> +fi
> +
> +cd $(mktemp -d)
> +for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
> +    $QEMU_SRC/configuire --cross-prefix=$prefix \

configure?

> +        --target-list=x86_64-softmmu,aarch64-softmmu
> +    make $MAKEFLAGS
> +done
> +

I suggest to add a trace backend as well (my tests run with
--enable-trace-backend=stderr, so maybe you want to choose
a different one).

Another useful option for configure is --enable-debug.
The compilation will be much faster and detect nearly
the same kind of problems as the standard compilation
(use of uninitialized variables won't be detected).

Regards,
Stefan
Eric Blake Feb. 3, 2016, 4:14 p.m. UTC | #2
On 02/03/2016 07:36 AM, Fam Zheng wrote:
> Only fedora22 has the required toolchain so it's not run elsewhere.

Not fedora 23 or rawhide? In another year, when F22 is obsolete, this
will be dead code unless you meant for it to be >= F22.

> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/docker/mingw.sh | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  create mode 100755 tests/docker/mingw.sh
> 
> diff --git a/tests/docker/mingw.sh b/tests/docker/mingw.sh
> new file mode 100755
> index 0000000..0f103cd
> --- /dev/null
> +++ b/tests/docker/mingw.sh
> @@ -0,0 +1,14 @@
> +#!/bin/bash
> +
> +if [ "$IMAGE_TAG" != "fedora22" ]; then
> +    echo "Mingw test skipped"
> +    exit 0
> +fi
> +
> +cd $(mktemp -d)
> +for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
> +    $QEMU_SRC/configuire --cross-prefix=$prefix \
> +        --target-list=x86_64-softmmu,aarch64-softmmu
> +    make $MAKEFLAGS
> +done
> +
>
Fam Zheng Feb. 4, 2016, 2:28 a.m. UTC | #3
On Wed, 02/03 09:14, Eric Blake wrote:
> On 02/03/2016 07:36 AM, Fam Zheng wrote:
> > Only fedora22 has the required toolchain so it's not run elsewhere.
> 
> Not fedora 23 or rawhide? In another year, when F22 is obsolete, this
> will be dead code unless you meant for it to be >= F22.

Good point, will address that. Thanks!

Fam

> 
> > 
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> >  tests/docker/mingw.sh | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >  create mode 100755 tests/docker/mingw.sh
> > 
> > diff --git a/tests/docker/mingw.sh b/tests/docker/mingw.sh
> > new file mode 100755
> > index 0000000..0f103cd
> > --- /dev/null
> > +++ b/tests/docker/mingw.sh
> > @@ -0,0 +1,14 @@
> > +#!/bin/bash
> > +
> > +if [ "$IMAGE_TAG" != "fedora22" ]; then
> > +    echo "Mingw test skipped"
> > +    exit 0
> > +fi
> > +
> > +cd $(mktemp -d)
> > +for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
> > +    $QEMU_SRC/configuire --cross-prefix=$prefix \
> > +        --target-list=x86_64-softmmu,aarch64-softmmu
> > +    make $MAKEFLAGS
> > +done
> > +
> > 
> 
> -- 
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
Fam Zheng Feb. 4, 2016, 2:29 a.m. UTC | #4
On Wed, 02/03 16:08, Stefan Weil wrote:
> Am 03.02.2016 um 15:36 schrieb Fam Zheng:
> > Only fedora22 has the required toolchain so it's not run elsewhere.
> > 
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> >  tests/docker/mingw.sh | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >  create mode 100755 tests/docker/mingw.sh
> > 
> > diff --git a/tests/docker/mingw.sh b/tests/docker/mingw.sh
> > new file mode 100755
> > index 0000000..0f103cd
> > --- /dev/null
> > +++ b/tests/docker/mingw.sh
> > @@ -0,0 +1,14 @@
> > +#!/bin/bash
> > +
> > +if [ "$IMAGE_TAG" != "fedora22" ]; then
> > +    echo "Mingw test skipped"
> > +    exit 0
> > +fi
> > +
> > +cd $(mktemp -d)
> > +for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
> > +    $QEMU_SRC/configuire --cross-prefix=$prefix \
> 
> configure?

Yes, how could I not notice the type? @.@

> 
> > +        --target-list=x86_64-softmmu,aarch64-softmmu
> > +    make $MAKEFLAGS
> > +done
> > +
> 
> I suggest to add a trace backend as well (my tests run with
> --enable-trace-backend=stderr, so maybe you want to choose
> a different one).

Will do.

> 
> Another useful option for configure is --enable-debug.
> The compilation will be much faster and detect nearly
> the same kind of problems as the standard compilation
> (use of uninitialized variables won't be detected).

OK.

Thanks for taking a look!

Fam

> 
> Regards,
> Stefan
>
Paolo Bonzini Feb. 4, 2016, 11:24 a.m. UTC | #5
On 04/02/2016 03:29, Fam Zheng wrote:
>> > I suggest to add a trace backend as well (my tests run with
>> > --enable-trace-backend=stderr, so maybe you want to choose
>> > a different one).
> Will do.
> 

Note that the stderr (now renamed to "log") is now the default.

Paolo
Daniel P. Berrangé Feb. 4, 2016, noon UTC | #6
On Wed, Feb 03, 2016 at 10:36:03PM +0800, Fam Zheng wrote:
> Only fedora22 has the required toolchain so it's not run elsewhere.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/docker/mingw.sh | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  create mode 100755 tests/docker/mingw.sh
> 
> diff --git a/tests/docker/mingw.sh b/tests/docker/mingw.sh
> new file mode 100755
> index 0000000..0f103cd
> --- /dev/null
> +++ b/tests/docker/mingw.sh
> @@ -0,0 +1,14 @@
> +#!/bin/bash
> +
> +if [ "$IMAGE_TAG" != "fedora22" ]; then
> +    echo "Mingw test skipped"
> +    exit 0
> +fi
> +
> +cd $(mktemp -d)
> +for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
> +    $QEMU_SRC/configuire --cross-prefix=$prefix \
> +        --target-list=x86_64-softmmu,aarch64-softmmu
> +    make $MAKEFLAGS
> +done

Automated build tests should really pass explicit '--enable-xxx'
flags for every feature we expect to be present. This means that
if someone breaks feature detection in QEMU, we are more likely
to see a build failure, rather than the feature being silently
disabled for months on end.

Regards,
Daniel
diff mbox

Patch

diff --git a/tests/docker/mingw.sh b/tests/docker/mingw.sh
new file mode 100755
index 0000000..0f103cd
--- /dev/null
+++ b/tests/docker/mingw.sh
@@ -0,0 +1,14 @@ 
+#!/bin/bash
+
+if [ "$IMAGE_TAG" != "fedora22" ]; then
+    echo "Mingw test skipped"
+    exit 0
+fi
+
+cd $(mktemp -d)
+for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
+    $QEMU_SRC/configuire --cross-prefix=$prefix \
+        --target-list=x86_64-softmmu,aarch64-softmmu
+    make $MAKEFLAGS
+done
+