jpf-symbc setup junit.home build error

253 views
Skip to first unread message

Chelsea Metcalf

unread,
Sep 14, 2016, 6:30:26 PM9/14/16
to Java™ Pathfinder
Hi,

I am trying to setup jpf-symbc. I have successfully setup jpf-core and am able to run the examples just fine. However, when I do this for jpf-symbc, I get this error when I run "ant test":

BUILD FAILED

/Users/chelseametcalf/Documents/jpf/jpf-symbc/build.xml:221: /Users/chelseametcalf/Documents/jpf/jpf-symbc/${junit.home} does not exist.


I do not understand why I get this error because my JUNIT_HOME is set and it works fine with jpf-core. I have also configured my site.properties files as:


site.properties:

# JPF site configuration


jpf-core = /Users/chelseametcalf/Documents/jpf/jpf-core


jpf-symbc = /Users/chelseametcalf/Documents/jpf/jpf-symbc


extensions=${jpf-core},${jpf-symbc}



Has anyone got a similar error where you can run jpf-core, but not jpf-symbc? I've been searching the forum, but I haven't found my exact problem. Also, I noticed that I am able to run "ant" (without the test) and it complies, but if I try to run the examples in the folder, I get a NoClassDefFoundError. I tried to run the Assume.jpf example with:

java -Djava.library.path=/Users/chelseametcalf/Documents/jpf/jpf-symbc/lib -jar /Users/chelseametcalf/Documents/jpf/jpf-core/build/RunJPF.jar /Users/chelseametcalf/Documents/jpf/jpf-symbc/src/examples/Assume.jpf Would this be correct in running the examples?


Thanks,
Chelsea

Kasper Søe Luckow

unread,
Sep 14, 2016, 7:34:23 PM9/14/16
to Java™ Pathfinder
Hi Chelsea,

You can either set
junit.home in your ~/.jpf/site.properties file

or, alternatively, you can add to build.xml:
<property name="junit.home" value="${env.JUNIT_HOME}"/>
right under the <target name="test" ... > element.
This is the same way as jpf-core. It should be added to the repo for jpf-symbc as well (I don't know why it's missing).

If you want to run a jpf file from the cmd line, you should first cd into jpf-symbc. Then (since jpf-core is located in ../jpf-core) you can do:
$ ../jpf-core/bin/jpf src/examples/Assume.jpf

Hope it helps.

- Kasper

--

---
You received this message because you are subscribed to the Google Groups "Java™ Pathfinder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-pathfind...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chelsea Metcalf

unread,
Sep 14, 2016, 8:14:14 PM9/14/16
to java-pa...@googlegroups.com
Hi Kasper,

Thank you for the speedy reply. I tried this (both ways) and I am getting the same error.

BUILD FAILED
/Users/chelseametcalf/Documents/jpf/jpf-symbc/build.xml:222: /Users/chelseametcalf/Documents/jpf/jpf-symbc/${env.JUNIT_HOME} does not exist.

Except now it says failed to find env.JUNIT_HOME instead of junit.home. But I also tried setting that in the site.properties file. When I echo the JUNIT_HOME path, everything appears fine and "ant test" works fine for jpf-core.

Chelseas-MacBook-Pro:jpf-symbc chelseametcalf$ echo $JUNIT_HOME
/Users/chelseametcalf/JUNIT

-Chelsea



You received this message because you are subscribed to a topic in the Google Groups "Java™ Pathfinder" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/java-pathfinder/Xf64Gi6W15M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to java-pathfind...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



Quoc-Sang Phan

unread,
Sep 15, 2016, 2:04:20 AM9/15/16
to Java™ Pathfinder
Hi Chelsea,

It failed to find find env.JUNIT_HOME, because "env" had not been set.
You need to set it in build.xml as the following:

<property environment="env"/>

It seems somebody accidentally deleted some important parts of build.xml.

--Sang

Chelsea Metcalf

unread,
Sep 15, 2016, 10:55:55 AM9/15/16
to java-pa...@googlegroups.com
Thank you so much everyone! That fixed the problem.

-Chelsea
Reply all
Reply to author
Forward
Message has been deleted
0 new messages