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



Hello,

Unfortunately I don't know much about buildout so I will have to take a look at it before making any comment on this solution.

Anyway, I would like to point out that it's possible to have multiple desktop-testing packages installed using different virtual environments (VirtualEnv, http://pypi.python.org/pypi/virtualenv).

In addition to this, when some changes are being applied to the framework instead of just adding test cases, then changing "distutils" for "setuptools" an using "python setup.py develop" instead of "python setup.py install" (http://peak.telecommunity.com/DevCenter/setuptools#development-mode) might be helpful to avoid any file permission problems.

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


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