Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we use "validate" in scripts? #20

Open
rpgoldman opened this issue Sep 12, 2017 · 3 comments
Open

How can we use "validate" in scripts? #20

rpgoldman opened this issue Sep 12, 2017 · 3 comments

Comments

@rpgoldman
Copy link

I was planning to invoke validate in a script, and check to see if my plan validated using the customary check against exit status. But I was disappointed to find that even when validate emitted `Bad plan description!" its exit code was still zero.

Digging further, since the plan argument is optional, and it's possible to check multiple plans in a single run of validate, I can see why the exit code wasn't set. And, indeed, AFAICT if validate fails to parse a plan file, it gets a zero back from getPlan, which means it's just like the plan not being there.

But if validate doesn't set an exit code, how can one use it in a script?

@DerekLong101
Copy link
Contributor

DerekLong101 commented Sep 13, 2017 via email

@rpgoldman
Copy link
Author

Yes, I think that would be quite helpful. The alternative would be forcing scripts to parse output strings, which isn't very appealing.

@maltehelmert
Copy link

For our work, we have to parse the output anyway because we are also interested in what VAL says about the quality of the validated plans. I don't know if it's helpful for you, but we use the "downward-lab" package by Jendrik Seipp for this, which is available online. I don't know how difficult it would be to adapt Jendrik's code for other planning systems than Fast Downward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants