All of lore.kernel.org
 help / color / mirror / Atom feed
* Running tests
@ 2017-04-12 17:22 Maxim Sloyko
  2017-04-12 17:59 ` Matthew Barth
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Sloyko @ 2017-04-12 17:22 UTC (permalink / raw)
  To: OpenBMC Maillist

Hi all,

I'm looking into ways to automate test execution for ... well ... as
many things as possible. I see that some repos, like
openbmc/phosphor-event for example, have tests in them, but the
problem is, I can't build and run that project individually, because
of missing dependencies (my libsystemd is too old).

So, my question is, is there a way to build and run those tests from
bitbake, so that they would use the version of systemd from yocto,
rather than the one installed on my machine?

Hope this question makes some sense.

Thank you!

-- 
Maxim Sloyko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running tests
  2017-04-12 17:22 Running tests Maxim Sloyko
@ 2017-04-12 17:59 ` Matthew Barth
  2017-04-12 22:51   ` Maxim Sloyko
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Barth @ 2017-04-12 17:59 UTC (permalink / raw)
  To: Maxim Sloyko, OpenBMC Maillist

On 04/12/17 12:22 PM, Maxim Sloyko wrote:
> Hi all,
>
> I'm looking into ways to automate test execution for ... well ... as
> many things as possible. I see that some repos, like
> openbmc/phosphor-event for example, have tests in them, but the
> problem is, I can't build and run that project individually, because
> of missing dependencies (my libsystemd is too old).
You can use bitbake to populate and install a x86_64 SDK environment 
that you
would be able to source into allowing you to build the project and run 
the tests.
There is a configure flag (--enable-oe-sdk) that must be given to the 
configure script
to setup some additional environment variables within the x86_64 SDK
environment. Here's a link with info on deploying an SDK:

https://github.com/openbmc/docs/blob/master/cheatsheet.md

Matt
> So, my question is, is there a way to build and run those tests from
> bitbake, so that they would use the version of systemd from yocto,
> rather than the one installed on my machine?
>
> Hope this question makes some sense.
>
> Thank you!
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running tests
  2017-04-12 17:59 ` Matthew Barth
@ 2017-04-12 22:51   ` Maxim Sloyko
  2017-04-13  1:40     ` Lei YU
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Sloyko @ 2017-04-12 22:51 UTC (permalink / raw)
  To: Matthew Barth; +Cc: OpenBMC Maillist

Hi Matt, thank you for your reply.

So, I've done "Building the OpenBMC SDK" step from the cheatsheet:

$ bitbake -c populate_sdk obmc-phosphor-image
$ ./tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.1.sh

Now when I do

./configure --enable-oe-sdk

I get this error:

checking whether we are cross compiling... configure: error: in
`/usr/local/google/home/maxims/nong3-dev/phosphor-event':
configure: error: cannot run C++ compiled programs.

What am I doing wrong?

On Wed, Apr 12, 2017 at 10:59 AM, Matthew Barth
<msbarth@linux.vnet.ibm.com> wrote:
> On 04/12/17 12:22 PM, Maxim Sloyko wrote:
>>
>> Hi all,
>>
>> I'm looking into ways to automate test execution for ... well ... as
>> many things as possible. I see that some repos, like
>> openbmc/phosphor-event for example, have tests in them, but the
>> problem is, I can't build and run that project individually, because
>> of missing dependencies (my libsystemd is too old).
>
> You can use bitbake to populate and install a x86_64 SDK environment that
> you
> would be able to source into allowing you to build the project and run the
> tests.
> There is a configure flag (--enable-oe-sdk) that must be given to the
> configure script
> to setup some additional environment variables within the x86_64 SDK
> environment. Here's a link with info on deploying an SDK:
>
> https://github.com/openbmc/docs/blob/master/cheatsheet.md
>
> Matt
>
>> So, my question is, is there a way to build and run those tests from
>> bitbake, so that they would use the version of systemd from yocto,
>> rather than the one installed on my machine?
>>
>> Hope this question makes some sense.
>>
>> Thank you!
>>
>



-- 
Maxim Sloyko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running tests
  2017-04-12 22:51   ` Maxim Sloyko
@ 2017-04-13  1:40     ` Lei YU
  2017-04-13  6:04       ` vishwa
  0 siblings, 1 reply; 9+ messages in thread
From: Lei YU @ 2017-04-13  1:40 UTC (permalink / raw)
  To: Maxim Sloyko; +Cc: Matthew Barth, OpenBMC Maillist

Hi Maxim,

After the SDK is installed, you need source the env:

# E.g. if SDK is installed in default localtion
. /opt/openbmc-phosphor/2.1/environment-setup-core2-64-openbmc-linux

And then

./bootstrap.sh
./configure --enable-oe-sdk
make test

—
BRs,
Lei YU

On Thu, Apr 13, 2017 at 6:51 AM, Maxim Sloyko <maxims@google.com> wrote:
> Hi Matt, thank you for your reply.
>
> So, I've done "Building the OpenBMC SDK" step from the cheatsheet:
>
> $ bitbake -c populate_sdk obmc-phosphor-image
> $ ./tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.1.sh
>
> Now when I do
>
> ./configure --enable-oe-sdk
>
> I get this error:
>
> checking whether we are cross compiling... configure: error: in
> `/usr/local/google/home/maxims/nong3-dev/phosphor-event':
> configure: error: cannot run C++ compiled programs.
>
> What am I doing wrong?
>
> On Wed, Apr 12, 2017 at 10:59 AM, Matthew Barth
> <msbarth@linux.vnet.ibm.com> wrote:
>> On 04/12/17 12:22 PM, Maxim Sloyko wrote:
>>>
>>> Hi all,
>>>
>>> I'm looking into ways to automate test execution for ... well ... as
>>> many things as possible. I see that some repos, like
>>> openbmc/phosphor-event for example, have tests in them, but the
>>> problem is, I can't build and run that project individually, because
>>> of missing dependencies (my libsystemd is too old).
>>
>> You can use bitbake to populate and install a x86_64 SDK environment that
>> you
>> would be able to source into allowing you to build the project and run the
>> tests.
>> There is a configure flag (--enable-oe-sdk) that must be given to the
>> configure script
>> to setup some additional environment variables within the x86_64 SDK
>> environment. Here's a link with info on deploying an SDK:
>>
>> https://github.com/openbmc/docs/blob/master/cheatsheet.md
>>
>> Matt
>>
>>> So, my question is, is there a way to build and run those tests from
>>> bitbake, so that they would use the version of systemd from yocto,
>>> rather than the one installed on my machine?
>>>
>>> Hope this question makes some sense.
>>>
>>> Thank you!
>>>
>>
>
>
>
> --
> Maxim Sloyko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running tests
  2017-04-13  1:40     ` Lei YU
@ 2017-04-13  6:04       ` vishwa
  2017-04-13 16:53         ` Maxim Sloyko
  0 siblings, 1 reply; 9+ messages in thread
From: vishwa @ 2017-04-13  6:04 UTC (permalink / raw)
  To: openbmc

Lei has already explained the crux. Adding little bit more to what Lei 
already suggested, I see that your are missing on executing that script

I would do bash 
/tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.1.sh

and then give it a location and then do the rest what Lei pointed out.

!! Vishwa !!

On 04/13/2017 07:10 AM, Lei YU wrote:
> Hi Maxim,
>
> After the SDK is installed, you need source the env:
>
> # E.g. if SDK is installed in default localtion
> . /opt/openbmc-phosphor/2.1/environment-setup-core2-64-openbmc-linux
>
> And then
>
> ./bootstrap.sh
> ./configure --enable-oe-sdk
> make test
>
> —
> BRs,
> Lei YU
>
> On Thu, Apr 13, 2017 at 6:51 AM, Maxim Sloyko <maxims@google.com> wrote:
>> Hi Matt, thank you for your reply.
>>
>> So, I've done "Building the OpenBMC SDK" step from the cheatsheet:
>>
>> $ bitbake -c populate_sdk obmc-phosphor-image
>> $ ./tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.1.sh
>>
>> Now when I do
>>
>> ./configure --enable-oe-sdk
>>
>> I get this error:
>>
>> checking whether we are cross compiling... configure: error: in
>> `/usr/local/google/home/maxims/nong3-dev/phosphor-event':
>> configure: error: cannot run C++ compiled programs.
>>
>> What am I doing wrong?
>>
>> On Wed, Apr 12, 2017 at 10:59 AM, Matthew Barth
>> <msbarth@linux.vnet.ibm.com> wrote:
>>> On 04/12/17 12:22 PM, Maxim Sloyko wrote:
>>>> Hi all,
>>>>
>>>> I'm looking into ways to automate test execution for ... well ... as
>>>> many things as possible. I see that some repos, like
>>>> openbmc/phosphor-event for example, have tests in them, but the
>>>> problem is, I can't build and run that project individually, because
>>>> of missing dependencies (my libsystemd is too old).
>>> You can use bitbake to populate and install a x86_64 SDK environment that
>>> you
>>> would be able to source into allowing you to build the project and run the
>>> tests.
>>> There is a configure flag (--enable-oe-sdk) that must be given to the
>>> configure script
>>> to setup some additional environment variables within the x86_64 SDK
>>> environment. Here's a link with info on deploying an SDK:
>>>
>>> https://github.com/openbmc/docs/blob/master/cheatsheet.md
>>>
>>> Matt
>>>
>>>> So, my question is, is there a way to build and run those tests from
>>>> bitbake, so that they would use the version of systemd from yocto,
>>>> rather than the one installed on my machine?
>>>>
>>>> Hope this question makes some sense.
>>>>
>>>> Thank you!
>>>>
>>
>>
>> --
>> Maxim Sloyko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running tests
  2017-04-13  6:04       ` vishwa
@ 2017-04-13 16:53         ` Maxim Sloyko
  2017-04-14  4:53           ` Lei YU
  2017-04-14 15:09           ` Patrick Williams
  0 siblings, 2 replies; 9+ messages in thread
From: Maxim Sloyko @ 2017-04-13 16:53 UTC (permalink / raw)
  To: vishwa; +Cc: OpenBMC Maillist

So, I installed the SDK (by running the shell script
tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.2.sh),
but I don't see anything named
environment-setup-core2-64-openbmc-linux (or something similar) in it.
The script that I have is named
environment-setup-armv5e-openbmc-linux-gnueabi, which I suspect is
what the problem is, because it sets up vars like

export CC="arm-openbmc-linux-gnueabi-gcc  -march=armv5e -marm
--sysroot=$SDKTARGETSYSROOT"
export CXX="arm-openbmc-linux-gnueabi-g++  -march=armv5e -marm
--sysroot=$SDKTARGETSYSROOT"
export CPP="arm-openbmc-linux-gnueabi-gcc -E  -march=armv5e -marm
--sysroot=$SDKTARGETSYSROOT"

and this does not look like what I want it to be.

On Wed, Apr 12, 2017 at 11:04 PM, vishwa <vishwa@linux.vnet.ibm.com> wrote:
> Lei has already explained the crux. Adding little bit more to what Lei
> already suggested, I see that your are missing on executing that script
>
> I would do bash
> /tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.1.sh
>
> and then give it a location and then do the rest what Lei pointed out.
>
> !! Vishwa !!
>
>
> On 04/13/2017 07:10 AM, Lei YU wrote:
>>
>> Hi Maxim,
>>
>> After the SDK is installed, you need source the env:
>>
>> # E.g. if SDK is installed in default localtion
>> . /opt/openbmc-phosphor/2.1/environment-setup-core2-64-openbmc-linux
>>
>> And then
>>
>> ./bootstrap.sh
>> ./configure --enable-oe-sdk
>> make test
>>
>> —
>> BRs,
>> Lei YU
>>
>> On Thu, Apr 13, 2017 at 6:51 AM, Maxim Sloyko <maxims@google.com> wrote:
>>>
>>> Hi Matt, thank you for your reply.
>>>
>>> So, I've done "Building the OpenBMC SDK" step from the cheatsheet:
>>>
>>> $ bitbake -c populate_sdk obmc-phosphor-image
>>> $
>>> ./tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.1.sh
>>>
>>> Now when I do
>>>
>>> ./configure --enable-oe-sdk
>>>
>>> I get this error:
>>>
>>> checking whether we are cross compiling... configure: error: in
>>> `/usr/local/google/home/maxims/nong3-dev/phosphor-event':
>>> configure: error: cannot run C++ compiled programs.
>>>
>>> What am I doing wrong?
>>>
>>> On Wed, Apr 12, 2017 at 10:59 AM, Matthew Barth
>>> <msbarth@linux.vnet.ibm.com> wrote:
>>>>
>>>> On 04/12/17 12:22 PM, Maxim Sloyko wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm looking into ways to automate test execution for ... well ... as
>>>>> many things as possible. I see that some repos, like
>>>>> openbmc/phosphor-event for example, have tests in them, but the
>>>>> problem is, I can't build and run that project individually, because
>>>>> of missing dependencies (my libsystemd is too old).
>>>>
>>>> You can use bitbake to populate and install a x86_64 SDK environment
>>>> that
>>>> you
>>>> would be able to source into allowing you to build the project and run
>>>> the
>>>> tests.
>>>> There is a configure flag (--enable-oe-sdk) that must be given to the
>>>> configure script
>>>> to setup some additional environment variables within the x86_64 SDK
>>>> environment. Here's a link with info on deploying an SDK:
>>>>
>>>> https://github.com/openbmc/docs/blob/master/cheatsheet.md
>>>>
>>>> Matt
>>>>
>>>>> So, my question is, is there a way to build and run those tests from
>>>>> bitbake, so that they would use the version of systemd from yocto,
>>>>> rather than the one installed on my machine?
>>>>>
>>>>> Hope this question makes some sense.
>>>>>
>>>>> Thank you!
>>>>>
>>>
>>>
>>> --
>>> Maxim Sloyko
>
>



-- 
Maxim Sloyko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running tests
  2017-04-13 16:53         ` Maxim Sloyko
@ 2017-04-14  4:53           ` Lei YU
  2017-04-14 15:09           ` Patrick Williams
  1 sibling, 0 replies; 9+ messages in thread
From: Lei YU @ 2017-04-14  4:53 UTC (permalink / raw)
  To: Maxim Sloyko; +Cc: vishwa, OpenBMC Maillist

Hi Maxim,

The SDK you installed is armv5e, it can be used to build targets for
armv5, but it’s not for running tests on your host.

To build and install host SDK:

TEMPLATECONF= . oe-init-build-env # Set default build target
# Manually edit `conf/local.conf` to
MACHINE ??= "qemux86-64"  # x86-64 SDK
# or
MACHINE ??= "qemux86"  # x86 SDK
# Build SDK
bitbake -c populate_sdk obmc-phosphor-image
# Then you get ./tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-core2-64-toolchain-2.2.sh

After you installed the x86 host SDK, you can run tests on host as my
previous mail.

Thanks!

—
BRs,
Lei YU

On Fri, Apr 14, 2017 at 12:53 AM, Maxim Sloyko <maxims@google.com> wrote:
> So, I installed the SDK (by running the shell script
> tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.2.sh),
> but I don't see anything named
> environment-setup-core2-64-openbmc-linux (or something similar) in it.
> The script that I have is named
> environment-setup-armv5e-openbmc-linux-gnueabi, which I suspect is
> what the problem is, because it sets up vars like
>
> export CC="arm-openbmc-linux-gnueabi-gcc  -march=armv5e -marm
> --sysroot=$SDKTARGETSYSROOT"
> export CXX="arm-openbmc-linux-gnueabi-g++  -march=armv5e -marm
> --sysroot=$SDKTARGETSYSROOT"
> export CPP="arm-openbmc-linux-gnueabi-gcc -E  -march=armv5e -marm
> --sysroot=$SDKTARGETSYSROOT"
>
> and this does not look like what I want it to be.
>
> On Wed, Apr 12, 2017 at 11:04 PM, vishwa <vishwa@linux.vnet.ibm.com> wrote:
>> Lei has already explained the crux. Adding little bit more to what Lei
>> already suggested, I see that your are missing on executing that script
>>
>> I would do bash
>> /tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.1.sh
>>
>> and then give it a location and then do the rest what Lei pointed out.
>>
>> !! Vishwa !!
>>
>>
>> On 04/13/2017 07:10 AM, Lei YU wrote:
>>>
>>> Hi Maxim,
>>>
>>> After the SDK is installed, you need source the env:
>>>
>>> # E.g. if SDK is installed in default localtion
>>> . /opt/openbmc-phosphor/2.1/environment-setup-core2-64-openbmc-linux
>>>
>>> And then
>>>
>>> ./bootstrap.sh
>>> ./configure --enable-oe-sdk
>>> make test
>>>
>>> —
>>> BRs,
>>> Lei YU
>>>
>>> On Thu, Apr 13, 2017 at 6:51 AM, Maxim Sloyko <maxims@google.com> wrote:
>>>>
>>>> Hi Matt, thank you for your reply.
>>>>
>>>> So, I've done "Building the OpenBMC SDK" step from the cheatsheet:
>>>>
>>>> $ bitbake -c populate_sdk obmc-phosphor-image
>>>> $
>>>> ./tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-2.1.sh
>>>>
>>>> Now when I do
>>>>
>>>> ./configure --enable-oe-sdk
>>>>
>>>> I get this error:
>>>>
>>>> checking whether we are cross compiling... configure: error: in
>>>> `/usr/local/google/home/maxims/nong3-dev/phosphor-event':
>>>> configure: error: cannot run C++ compiled programs.
>>>>
>>>> What am I doing wrong?
>>>>
>>>> On Wed, Apr 12, 2017 at 10:59 AM, Matthew Barth
>>>> <msbarth@linux.vnet.ibm.com> wrote:
>>>>>
>>>>> On 04/12/17 12:22 PM, Maxim Sloyko wrote:
>>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I'm looking into ways to automate test execution for ... well ... as
>>>>>> many things as possible. I see that some repos, like
>>>>>> openbmc/phosphor-event for example, have tests in them, but the
>>>>>> problem is, I can't build and run that project individually, because
>>>>>> of missing dependencies (my libsystemd is too old).
>>>>>
>>>>> You can use bitbake to populate and install a x86_64 SDK environment
>>>>> that
>>>>> you
>>>>> would be able to source into allowing you to build the project and run
>>>>> the
>>>>> tests.
>>>>> There is a configure flag (--enable-oe-sdk) that must be given to the
>>>>> configure script
>>>>> to setup some additional environment variables within the x86_64 SDK
>>>>> environment. Here's a link with info on deploying an SDK:
>>>>>
>>>>> https://github.com/openbmc/docs/blob/master/cheatsheet.md
>>>>>
>>>>> Matt
>>>>>
>>>>>> So, my question is, is there a way to build and run those tests from
>>>>>> bitbake, so that they would use the version of systemd from yocto,
>>>>>> rather than the one installed on my machine?
>>>>>>
>>>>>> Hope this question makes some sense.
>>>>>>
>>>>>> Thank you!
>>>>>>
>>>>
>>>>
>>>> --
>>>> Maxim Sloyko
>>
>>
>
>
>
> --
> Maxim Sloyko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running tests
  2017-04-13 16:53         ` Maxim Sloyko
  2017-04-14  4:53           ` Lei YU
@ 2017-04-14 15:09           ` Patrick Williams
  2017-04-14 22:34             ` Maxim Sloyko
  1 sibling, 1 reply; 9+ messages in thread
From: Patrick Williams @ 2017-04-14 15:09 UTC (permalink / raw)
  To: Maxim Sloyko; +Cc: vishwa, OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

Maxim,

I think you have two issues:

1) If you are running on an x86-host, you need to have an x86-target SDK
in order to compile and run on the x86-host.  Typically, we use the
qemux86-64 MACHINE.

2) When you run ./configure, you need to pass a set of options that
OE-SDK has set up:  ./configure ${CONFIGURE_FLAGS} --enable-oe-sdk

--
Patrick Williams

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Running tests
  2017-04-14 15:09           ` Patrick Williams
@ 2017-04-14 22:34             ` Maxim Sloyko
  0 siblings, 0 replies; 9+ messages in thread
From: Maxim Sloyko @ 2017-04-14 22:34 UTC (permalink / raw)
  To: Patrick Williams; +Cc: vishwa, OpenBMC Maillist

Thanks, I was able to successfully build x86 SDK with this instructions.

FWIW, the ./configure --enable-oe-sdk step was still failing with the
same error though, I had to run it as ./configure --enable-oe-sdk
--host x86_64, but make check did succeed after that.

Thanks again!

On Fri, Apr 14, 2017 at 8:09 AM, Patrick Williams <patrick@stwcx.xyz> wrote:
> Maxim,
>
> I think you have two issues:
>
> 1) If you are running on an x86-host, you need to have an x86-target SDK
> in order to compile and run on the x86-host.  Typically, we use the
> qemux86-64 MACHINE.
>
> 2) When you run ./configure, you need to pass a set of options that
> OE-SDK has set up:  ./configure ${CONFIGURE_FLAGS} --enable-oe-sdk
>
> --
> Patrick Williams



-- 
Maxim Sloyko

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-04-14 22:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12 17:22 Running tests Maxim Sloyko
2017-04-12 17:59 ` Matthew Barth
2017-04-12 22:51   ` Maxim Sloyko
2017-04-13  1:40     ` Lei YU
2017-04-13  6:04       ` vishwa
2017-04-13 16:53         ` Maxim Sloyko
2017-04-14  4:53           ` Lei YU
2017-04-14 15:09           ` Patrick Williams
2017-04-14 22:34             ` Maxim Sloyko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.