Message ID | 20180709152117.21585-10-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show |
Series | various docker fixes | expand |
On Mon, 07/09 16:21, Alex Bennée wrote: > This test doesn't even build QEMU, it just runs all the unit tests. > Intended to make checking unit tests on all docker images easier. > > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > --- > tests/docker/test-unit | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > create mode 100755 tests/docker/test-unit > > diff --git a/tests/docker/test-unit b/tests/docker/test-unit > new file mode 100755 > index 0000000000..be0d90d748 > --- /dev/null > +++ b/tests/docker/test-unit > @@ -0,0 +1,19 @@ > +#!/bin/bash > +# > +# Build and run the unit tests > +# > +# Copyright (c) 2018 Linaro Ltd. > +# > +# Authors: > +# Alex Bennée <alex.bennee@linaro.org> > +# > +# This work is licensed under the terms of the GNU GPL, version 2 > +# or (at your option) any later version. See the COPYING file in > +# the top-level directory. > + > +. common.rc > + > +cd "$BUILD_DIR" > + > +configure_qemu This reads a bit unusual and counter-intuitive: how could configure_qemu succeed when the env cannot actually build it? Does configure_qemu fail but the side effects needed to run build and run unit tests are done anyway? Either way, please add a comment explaining what is happening here. Also, should we test the exit code of configure_qemu? > +check_qemu check-unit > -- > 2.17.1 >
Fam Zheng <famz@redhat.com> writes: > On Mon, 07/09 16:21, Alex Bennée wrote: >> This test doesn't even build QEMU, it just runs all the unit tests. >> Intended to make checking unit tests on all docker images easier. >> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> >> --- >> tests/docker/test-unit | 19 +++++++++++++++++++ >> 1 file changed, 19 insertions(+) >> create mode 100755 tests/docker/test-unit >> >> diff --git a/tests/docker/test-unit b/tests/docker/test-unit >> new file mode 100755 >> index 0000000000..be0d90d748 >> --- /dev/null >> +++ b/tests/docker/test-unit >> @@ -0,0 +1,19 @@ >> +#!/bin/bash >> +# >> +# Build and run the unit tests >> +# >> +# Copyright (c) 2018 Linaro Ltd. >> +# >> +# Authors: >> +# Alex Bennée <alex.bennee@linaro.org> >> +# >> +# This work is licensed under the terms of the GNU GPL, version 2 >> +# or (at your option) any later version. See the COPYING file in >> +# the top-level directory. >> + >> +. common.rc >> + >> +cd "$BUILD_DIR" >> + >> +configure_qemu > > This reads a bit unusual and counter-intuitive: how could configure_qemu succeed > when the env cannot actually build it? Does configure_qemu fail but the side > effects needed to run build and run unit tests are done anyway? Either way, > please add a comment explaining what is happening here. Although we are not building QEMU itself we still need a configured build environment as we build sub-modules of QEMU to bind into the unit tests. I'll add a comment. > > Also, should we test the exit code of configure_qemu? Or maybe just make the script -e? > >> +check_qemu check-unit >> -- >> 2.17.1 >> -- Alex Bennée
diff --git a/tests/docker/test-unit b/tests/docker/test-unit new file mode 100755 index 0000000000..be0d90d748 --- /dev/null +++ b/tests/docker/test-unit @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Build and run the unit tests +# +# Copyright (c) 2018 Linaro Ltd. +# +# Authors: +# Alex Bennée <alex.bennee@linaro.org> +# +# This work is licensed under the terms of the GNU GPL, version 2 +# or (at your option) any later version. See the COPYING file in +# the top-level directory. + +. common.rc + +cd "$BUILD_DIR" + +configure_qemu +check_qemu check-unit
This test doesn't even build QEMU, it just runs all the unit tests. Intended to make checking unit tests on all docker images easier. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- tests/docker/test-unit | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 tests/docker/test-unit -- 2.17.1