sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #10391
Re: [Question #195742]: How to run the tests that test sikuli project itself
Question #195742 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/195742
Status: Answered => Open
Gregory Nelson is still having a problem:
Thanks for fast response!
I'm on Ubuntu 12.04 openJDK 6 and have an Ubuntu 11.10 sun java6 VM. I can
get both of them to build (12.04 with changes to some header files for
different opencv library structure, which I have on
https://github.com/greglnelson/sikuli/tree/ubuntu_1204_build , also has my
CMakeCache in case you might want that).
I can now run the tests but some have errors wrt imports, finding files for
tests. The errors are the same on both platforms, so I think I've ruled out
java version differences causing it. Here is the test output, I also have
it in a file on the branch mentioned above.
Output from run-py-test.sh
Tesseract-OCR Data Path: /usr/local/share/tessdata
Tesseract-OCR Data Path: /usr/local/share/tessdata
-- checking for module 'Tesseract'
-- package 'Tesseract' not found
-- Found Tesseract
NATIVE_LIBS: VisionProxy;VDictProxy
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/g/proj/sikuli/s2/sikuli-script/build
Run Python unit tests
find tests in /home/g/proj/sikuli/s2/sikuli-script/src/test/python
[info] Sikuli vision engine loaded.
[info] VDictProxy loaded.
testAppWindow (test_app.TestApp) ... [log] openApp: /usr/bin/gcalctool
[log] App.open /usr/bin/gcalctool(18044)
[log] App.close /usr/bin/gcalctool(18044)
ok
testBasicClass (test_basic.TestBasic) ... ok
testConstants (test_basic.TestBasic) ... ok
testGlobalFunction (test_basic.TestBasic) ... ok
testImagePath (test_basic.TestBasic) ... ok
testImport (test_basic.TestBasic) ... ok
testPattern (test_basic.TestBasic) ... ok
testCapsLock (test_env.TestEnv) ... ok
testMouseLocation (test_env.TestEnv) ... ok
testOS (test_env.TestEnv) ... ok
testSikuliVersion (test_env.TestEnv) ... ok
Failure: ImportError (cannot import name JButtons) ... ERROR
testAddHotkey (test_hotkey.TestHotkey) ... [info] add hotkey: F6
ok
testAddHotkeyReal (test_hotkey.TestHotkey) ... [info] add hotkey: F6
ok
testRemoveHotkey (test_hotkey.TestHotkey) ... [info] remove hotkey: F7
[info] add hotkey: F7
[info] remove hotkey: F7
ok
testButtons (test_key.TestKeyAndButton) ... ok
testCommonKeys (test_key.TestKeyAndButton) ... ok
testModifiers (test_key.TestKeyAndButton) ... ok
testNewModifiers (test_key.TestKeyAndButton) ... ok
testToJythonRegion (test_pyregion.TestJavaRegion) ... ok
Failure: ImportError (cannot import name JButtons) ... ERROR
Failure: ImportError (cannot import name JButtons) ... ERROR
testDelete (test_vdict.TestVDict) ... ERROR
testFileNotFound (test_vdict.TestVDict) ... ok
testInit (test_vdict.TestVDict) ... ok
testInsert (test_vdict.TestVDict) ... ERROR
testLookup (test_vdict.TestVDict) ... ERROR
======================================================================
ERROR: Failure: ImportError (cannot import name JButtons)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/loader.py",
line 389, in loadTestsFromName
module = self.importer.importFromPath(
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/importer.py",
line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/importer.py",
line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/g/proj/sikuli/s2/sikuli-script/src/test/python/test_find.py",
line 3, in <module>
from org.sikuli.script import JButtons
ImportError: cannot import name JButtons
======================================================================
ERROR: Failure: ImportError (cannot import name JButtons)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/loader.py",
line 389, in loadTestsFromName
module = self.importer.importFromPath(
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/importer.py",
line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/importer.py",
line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File
"/home/g/proj/sikuli/s2/sikuli-script/src/test/python/test_region.py", line
4, in <module>
from org.sikuli.script import JButtons
ImportError: cannot import name JButtons
======================================================================
ERROR: Failure: ImportError (cannot import name JButtons)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/loader.py",
line 389, in loadTestsFromName
module = self.importer.importFromPath(
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/importer.py",
line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File
"/home/g/proj/sikuli/s2/sikuli-script/build/site-packages/nose-1.1.2-py2.5.egg/nose/importer.py",
line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File
"/home/g/proj/sikuli/s2/sikuli-script/src/test/python/test_screen.py", line
4, in <module>
from org.sikuli.script import JButtons
ImportError: cannot import name JButtons
======================================================================
ERROR: testDelete (test_vdict.TestVDict)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/g/proj/sikuli/s2/sikuli-script/src/test/python/test_vdict.py", line
75, in testDelete
self.dict["test-res/1.png"] = 1
File
"/home/g/proj/sikuli/s2/sikuli-script/target/sikuli-script.jar/Lib/sikuli/VDict.py",
line 46, in __setitem__
self.insert(key, item)
FileNotFoundException: java.io.FileNotFoundException: No such file:
null/test-res/1.png
======================================================================
ERROR: testInsert (test_vdict.TestVDict)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/g/proj/sikuli/s2/sikuli-script/src/test/python/test_vdict.py", line
27, in testInsert
self.dict["test-res/1.png"] = 1
File
"/home/g/proj/sikuli/s2/sikuli-script/target/sikuli-script.jar/Lib/sikuli/VDict.py",
line 46, in __setitem__
self.insert(key, item)
FileNotFoundException: java.io.FileNotFoundException: No such file:
null/test-res/1.png
======================================================================
ERROR: testLookup (test_vdict.TestVDict)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/g/proj/sikuli/s2/sikuli-script/src/test/python/test_vdict.py", line
60, in testLookup
self.dict["test-res/1.png"] = 1
File
"/home/g/proj/sikuli/s2/sikuli-script/target/sikuli-script.jar/Lib/sikuli/VDict.py",
line 46, in __setitem__
self.insert(key, item)
FileNotFoundException: java.io.FileNotFoundException: No such file:
null/test-res/1.png
----------------------------------------------------------------------
XML: /home/g/proj/sikuli/s2/sikuli-script/build/TEST-Sikuli-Python-Suite.xml
----------------------------------------------------------------------
Ran 27 tests in 7.185s
FAILED (errors=6)
Thanks again for any help,
Greg
On Thu, May 3, 2012 at 2:10 AM, RaiMan <question195742@xxxxxxxxxxxxxxxxxxxxx
> wrote:
> Your question #195742 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/195742
>
> Status: Open => Answered
>
> RaiMan proposed the following answer:
> Just tested on my Mac Lion 10.7.3:
>
> As stated in the run-py-test.sh, this has to be run in the build
> directory of sikuli-script.
>
> I did it as (written here with your folder ;-):
> cd "/home/g/proj/sikuli/sikuli/sikuli-script"
> cd build
> . ../run-py-test.sh
>
> and it worked as expected.
> Since I did it the first time, it installed nose before starting the test.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/195742/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/195742
>
> You received this question notification because you asked the question.
>
--
Greg
LinkedIn <http://www.linkedin.com/in/greglnelson>
Facebook <http://www.facebook.com/greglnelson>
@greglnelson <https://twitter.com/#!/gregLnelson>
+1 (202) 742-6926
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.