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

Using stoke testcase with multiple arguments #210

Closed
bchurchill opened this issue Nov 14, 2014 · 12 comments
Closed

Using stoke testcase with multiple arguments #210

bchurchill opened this issue Nov 14, 2014 · 12 comments

Comments

@bchurchill
Copy link
Member

I'm sure this will eventually boil down to something in cpputil, but it would be nice if we could make stoke testcase --args take a list of arguments, rather than only one.

@eschkufz
Copy link
Contributor

I think that args is a string of as many args as you want.

So --bin ./a.out --args "--a1 --a2 --a3" will end up calling ./a.out --a1
--a2 --a3.

On Fri, Nov 14, 2014 at 1:15 AM, Berkeley Churchill <
notifications@github.com> wrote:

I'm sure this will eventually boil down to something in cpputil, but it
would be nice if we could make stoke testcase --args take a list of
arguments, rather than only one.


Reply to this email directly or view it on GitHub
#210.

@bchurchill
Copy link
Member Author

I tried this, but it actually just passed one argument that had spaces in it, instead of arguments separated by spaces.

@eschkufz
Copy link
Contributor

I don't think I understand the difference.

@bchurchill
Copy link
Member Author

It's the difference between

rm -rf tmp files

and

rm -rf "tmp files"

The first one removes the 'tmp' folder and the 'files' folder; the
second removes the folder called "tmp files".

On 11/15/2014 08:35 PM, eric schkufza wrote:

I don't think I understand the difference.


Reply to this email directly or view it on GitHub:
#210 (comment)

@eschkufz
Copy link
Contributor

Right. Duh!

On Sat, Nov 15, 2014 at 9:02 PM, Berkeley Churchill <
notifications@github.com> wrote:

It's the difference between

rm -rf tmp files

and

rm -rf "tmp files"

The first one removes the 'tmp' folder and the 'files' folder; the
second removes the folder called "tmp files".

On 11/15/2014 08:35 PM, eric schkufza wrote:

I don't think I understand the difference.


Reply to this email directly or view it on GitHub:
#210 (comment)


Reply to this email directly or view it on GitHub
#210 (comment).

@eschkufz eschkufz added this to the Release 2.0 milestone Dec 2, 2014
@eschkufz eschkufz self-assigned this Dec 2, 2014
@eschkufz
Copy link
Contributor

eschkufz commented Dec 2, 2014

This has to do with x64asm parsing string arguments that contain spaces.

@eschkufz
Copy link
Contributor

eschkufz commented Dec 3, 2014

I take that back. The behavior we're seeing is exactly what we're asking for.

The solution here is to provide the --args argument with a parser that reads everything between quotes. We want the generic string reader to stop reading on whitespace. This is done now. Looks to be working.

@eschkufz
Copy link
Contributor

eschkufz commented Dec 3, 2014

(Also fixed a regression in stoke testcase.)

@jamesalbert
Copy link

jamesalbert commented Apr 22, 2017

I'm still experiencing problems with this. This is my testcase.conf

##### stoke testcase config file

--bin ./sana
--args "-g1 yeast -g2 human" # I've tried with and without quotes and quotes around each arg
--functions bins

-o simpleRun.tc

--fxn _ZN10TabuSearch9simpleRunERK9AlignmentdRy
--max_testcases 1024

and the error I'm getting from stoke testcase --config testcase.conf is:

Errors:

  --args <arg1 arg2 ... argn>
      Error reading value: No argument provided!
  -g1 yeast -g2 human 
      Ignoring unrecognized argument!

am I doing something wrong? When you say "provide the --args argument with a parser that reads everything between quotes" is that something I need to do? Would you guys @eschkufz or @bchurchill know what to do here?

edit: I managed to get this working by hardcoding in the default value and rebuilding stoke. But hopefully there's a better solution

@bchurchill
Copy link
Member Author

bchurchill commented Apr 23, 2017 via email

@jamesalbert
Copy link

No worries, added issue #955

@bchurchill
Copy link
Member Author

bchurchill commented Apr 24, 2017 via email

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

No branches or pull requests

3 participants