Re: [gnome-desktop-testing] Missing path when running ./bin/desktop-testing



Hello,

I've been looking into Markus branch and the buildout documentation and it seems
fine to me.

If I understood correctly, the minimal changes that buildout needs to work is
the addition of:
- The configuration file: buildout.cfg
- The boostrap script: bootstrap.py

Then, when the bootstrap.py script is run, the buildout script is generated and
it can be used to install the scripts in the development environment the same
way as setup.py will install them, but with the exception that sys.path is
changed to make sure that the correct modules are imported when the scripts are
called.

Another good thing is that the setup.py script is parsed every time that
buildout is called so every change in setup.py will be updated in the
development environment just by running buildout again.

Probably some other changes are needed for a better buildout integration in
desktop-testing code such as moving the code under a 'src' directory (this would
 make easier to have bin directory instead of a buildout-bin), but I would say
that the change could be beneficial for us.

The only couple of things that aren't so clear to me are:

- We are not using setuptools in our setup.py file. Will buildout work correctly
anyway (in the examples I've seen the setup.py file use setuptools)?

- If that's not the case, then we need to change setup.py to use setuptools.
Will we have any problem? I see that DistUtilsExtra package is being used and
that the debian packaging scripts depend on
/usr/share/cdbs/1/class/python-distutils.mk, so maybe not everything would
integrate so easily.

Please let me know your comments on this.

Best regards,
    Javier

Ara Pulido wrote:
> Indeed this is an issue.
> 
> Another approach has been implemented in an ubuntu-desktop-testing
> branch by Markus Korn [1] that uses buildout to create a running
> environment in the same folder.
> 
> Which solution do you think it is best?
> 
> Cheers,
> Ara.
> 
> 
> [1]
> https://code.launchpad.net/~thekorn/ubuntu-desktop-testing/use_buildout
> 
> On Sun, 2009-04-05 at 10:10 +0100, Jason Cozens wrote:
>> Following the instructions on the "How to run the tests" page:
>>
>> http://live.gnome.org/DesktopTesting/Documentation/GettingStarted
>>
>> I get the following error when running ./bin/desktop-testing:
>>
>> :~/gnome-desktop-testing$ ./bin/desktop-testing 
>> Traceback (most recent call last):
>>   File "./bin/desktop-testing", line 488, in <module>
>>     sys.exit(main())
>>   File "./bin/desktop-testing", line 295, in main
>>     process_suite_file(suite_file, options.target, options.case)
>>   File "./bin/desktop-testing", line 211, in process_suite_file
>>     run_suite_file(suite_file, log_file, cases)
>>   File "./bin/desktop-testing", line 165, in run_suite_file
>>     runner = TestSuiteRunner(suite_file)
>>   File "./bin/desktop-testing", line 414, in __init__
>>     mod = __import__(modname)
>>   File "./gedit/gedit_chains.py", line 8, in <module>
>>     from desktoptesting.gnome import GEdit
>> ImportError: No module named desktoptesting.gnome
>>
>> I've fixed this by either adding the current directory to $PYTHONPATH or
>> editing the desktop-testing file:
>>
>> :~$ svn diff gnome-desktop-testing/
>> Index: gnome-desktop-testing/bin/desktop-testing
>> ===================================================================
>> --- gnome-desktop-testing/bin/desktop-testing	(revision 10)
>> +++ gnome-desktop-testing/bin/desktop-testing	(working copy)
>> @@ -16,6 +16,8 @@
>>  from time import time, gmtime, strftime
>>  from shutil import move
>>  
>> +sys.path = sys.path + [os.getcwd()]
>> +
>>  # Globals
>>  TESTS_SHARE = "."
>>  TESTS_HOME  = os.environ["HOME"] + "/.desktop-test
>>
>> Is this a problem?
>>
>> If it is I think that the tests should run as soon as they have been
>> checked out without further changes.
>>
>> Cheers,
>> Jason.
>>
>> _______________________________________________
>> http://live.gnome.org/DesktopTesting
>> desktop-testing-list mailing list
>> desktop-testing-list gnome org
>> http://mail.gnome.org/mailman/listinfo/desktop-testing-list
> 
> _______________________________________________
> http://live.gnome.org/DesktopTesting
> desktop-testing-list mailing list
> desktop-testing-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-testing-list
> 


Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]