[RC3] Can't use a folder named "libs" in Eclipse project (working folder at runtime)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Fix Released
|
Critical
|
RaiMan |
Bug Description
Sikuli version: r930
Operating system: Mac 10.7.5, 64 bit
Hello!
For some time I have been having troubles with getting a Sikuli test to run in my Eclipse project on my Mac until today. In the project I have a folder named "libs" in which all the necessary .jar files are stored to be used by the automated tests. It works fine to have this "libs" folder while on a Windows machine, however no Sikuli tests will run when it is on a Mac. I found that if I changed the name to something else, e.g. "libraries", it will work perfectly. My guess is that Sikuli is getting confused and trying to access the wrong "libs" folder, accessing the one in the Eclipse project instead of a different one.
Here are some step by step instructions:
1. Set up Eclipse to use 32 bit Java 6 and have the SikuliScript variable pointing to /Applications/
2. Open Eclipse and create any project, for example "TestProject"
3. Create a package for your test "com.test.bug"
4. Create a class called "BugTest"
5. Copy and paste the following code into BugTest:
package com.test.bug;
import org.junit.Test;
import org.sikuli.
public class BugTest
{
@Test
public void testBugTest()
{
}
}
5. In the project, create a folder called "libs"
6. Import any .jar file into this folder
7. Try to run BugTest as a JUnit 4 test and notice it will fail
8. Rename the "libs" folder created in step 5 to be "libraries"
9. Run BugTest
10. Notice that the test now runs as expected
I was very surprised that this was the problem because using "libs" as a folder name seems to be pretty standard. Please let me know if you need any more information, I'd be happy to help.
description: | updated |
description: | updated |
Changed in sikuli: | |
assignee: | nobody → RaiMan (raimund-hocke) |
status: | New → Fix Committed |
importance: | Undecided → Critical |
milestone: | none → x1.0 |
summary: |
- X-1.0rc3r930: Can't use a folder named "libs" in Eclipse project - (working folder at runtime) + [RC3] Can't use a folder named "libs" in Eclipse project (working folder + at runtime) |
Changed in sikuli: | |
status: | Fix Committed → Fix Released |
a folder libs in the working directory is used by X-1.0rc3 in the first place, no matter wether its content is valid or not.
This will be solved in the new version.