-
Notifications
You must be signed in to change notification settings - Fork 108
Test and executable runner options #221
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
Test and executable runner options #221
Conversation
Note, this should be merged after #220 |
While #220 makes it effectively impossible to know the path to the produced executable (which is something we were trying to avoid specifying anyway), this, combined with the |
As mentioned the --flag option does not allow multiple compiler options. A small errata is to change addional ==> additional in the help text. Wondering if for a cross-mounted installation if the UUID for the directory should include some kind of system identifier as well; so that if I compile on a big-endian and small-endian machine from the same directory, for example, that I get two different output directories. Did not look carefully at how the key is generated, but right now using the same flags in a different order generates a different output file (ie. PS: For testing I found the intrinsics for echoing the compiler version and options useful. Last I checked a lot of compilers still did not implement that; but maybe each build directory could have a little program built into it that called those functions and maybe even
|
PS: Was not clear from --target option that "fpm run A B C" still worked or whether you could have multiple names on --target or specify --target more than once. Wondering if with --target you can combine it with command options instead of using -- to something like fpm run --target 'A -x 10.3 -y 20' might work. Was wondering why the change to having an option like --target when the original just asked for a list of executable names. |
I keep running into cases where using xargs(1) makes it easier as not all commands take the filenames at the end. fpm run --runner 'ls -l'
fpm run --runner file
fpm run --runner time
fpm run --runner sum
fpm run --runner 'valgrind --leak-check=full -s'
# get list of pathnames
fpm run --runner 'echo'
# debugger
fpm run --runner 'gdb'
# combine echo and xargs
fpm run --runner 'echo'|xargs -iXX cp XX /tmp/bin/
# copy with name at end of command (people usually use "cp FILE DIR/")
fpm run --runner 'cp --target-directory=/tmp/bin/ --update'
# make nice little table of names that can be run or tested
fpm test --runner echo|xargs -iXX basename XX|xargs -n 5|column -t
# install binaries in specified directory
fpm run --runner 'env VERSION_CONTROL=numbered install -D --owner=$LOGNAME --preserve-timestamps --backup --suffix=`date +%Y%M%D` --group=$(id -nG) --mode=0711 --target-directory=/tmp/bin/fpm --verbose --preserve-context' |
Yeah, I'm not totally enamored with the verbosity of having to specify every flag with For recording compiler version and options, we could just put a log file at the base of the build directory that identifies them. Just printing the exact strings used to generate the hashes would probably be sufficient for most cases.
|
With #220 merged in, this is now ready as well. I don't think I've seen any significant objections, so I'd like to merge it sooner rather than later, but I'll give a day or two for anybody to take another look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay in reviewing. I've played around with it using valgrind and gdb
and all works as expected 👍
Having seen no objections, and indications that the Fortran version will soon have this same functionality, I'm going to go ahead and merge. |
Allow a way of specifying a command to be used to run the executable(s) or test(s).
An example of where this might be particularly useful (practically necessary) is
to run the tests while looking for memory leaks.