[ell-i-developers] Re: Robot Framework Testing: Test Cases Design, Scripting and other Issues

  • From: Asif Sardar <engr.asif.sardar@xxxxxxxxxxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Mon, 2 Jun 2014 13:08:57 +0300

I am using the run scripts from
https://github.com/Ell-i/ELL-i-PyBot-Tests/blob/master/run-tests/DigitalRead.py

The DigitalRead.py is loading the libemulator.so. I get the following error
when I run ./DigitalRead.py:

*[ ERROR ] Error in file
'/home/asif/Ell-i-Working-Directory/Ell-i-Software-Testing/ELL-i-PyBot-Tests/test-suites/ELL-i-PyBot-Tests.wiki/DigitalRead.rest':
Importing test library
'/home/asif/Ell-i-Working-Directory/Ell-i-Software-Testing/ELL-i-PyBot-Tests/test-scripts/DigitalRead.py'
failed: OSError: ../libemulator.so: wrong ELF class: ELFCLASS32*
*Traceback (most recent call last):*
*  File
"/home/asif/Ell-i-Working-Directory/Ell-i-Software-Testing/ELL-i-PyBot-Tests/test-scripts/DigitalRead.py",
line 8, in <module>*
*    emulator = CDLL("../libemulator.so")*
*  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__*
*    self._handle = _dlopen(self._name, mode)*

After Google search it says that it might be due to 32-64 bit architecture
compatibility problem.
http://askubuntu.com/questions/398929/unable-to-load-shared-object-wrong-elf-class-elfclass32

My $PATH looks like (/opt/pym32/bin has got the manual python 32 bit
binaries):
*/opt/pym32/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/asif/Ell-i-Working-Directory/Ell-i-Software-Development/gcc-arm-none-eabi-4_8-2014q1/bin/:/home/asif/Ell-i-Working-Directory/Ell-i-Software-Development/stm32flash/*

I have written following lines in ~/.bashrc file, which is supposed to
export the above path and changes persistently to the bash terminal
whenever it starts. I am using the default command line interpreter for
Ubuntu which is known as *Terminal *which I presume is bash by default. The
lines I have added in my ./bashrc file are:

*export
PATH=${PATH}:~/Ell-i-Working-Directory/Ell-i-Software-Development/gcc-arm-none-eabi-4_8-2014q1/bin/*
*export
PATH=${PATH}:~/Ell-i-Working-Directory/Ell-i-Software-Development/stm32flash/*
*export PATH="/opt/pym32/bin:${PATH}"*
*alias python=/opt/pym32/bin/python*




On Sun, Jun 1, 2014 at 7:45 PM, Pekka Nikander <pekka.nikander@xxxxxx>
wrote:

> > After this, I installed the robot framework again (keeping in mind it
> will use the manual python path) ... then when I run the test case to load
> shared library, it still failed.
>
> Would you please send the details.  How do you start the RF test cases,
> i.e. with which script (pointer to the file in github, e.g.)?  What does
> your $PATH look like?  Did you remember to export the path, too, not just
> set it for the current shell itself?  Which shell are you using, if other
> than bash?
>
> What error message do you get?
>
> --Pekka
>
>


-- 



*With Best Regards,Asif Sardar.+358 43 8265795*

Other related posts: