On Feb 26, 2016, at 8:00 AM, Martin Jambor <mjam...@suse.cz> wrote: > we would like a place to have some HSA-specific tests
Sounds reasonable. > I have very little experience with tcl, expect or DejaGNU and would > appreciate very much any feedback or guidance of anyone more > experience in these areas. In particular, it would probably be better > to structure the new predicate as an effective-target one but I am not > sure what amount of caching would I have to do manually for such a new > runtime test. When you run the test suite, if you have more than 1 compile of the file to check if offloading is available per make -j instance, yes, you should cache the result. Also, the other usual failure would be to change flags and not change them back, this would should up in a full test suite run when you compare the .log file and look for changes to other parts of the test suite that you are not changing. So for how to cache, just copy one of the checks that cache, proc check_effective_target_dfprt is a nice simple one. It is five lines, and the only changes to it is the spelling of the name from dfprt to hsa_offloading_available and the change of the prefix of the name to check_effective_target_ away from check_. What means, you have to add _nocache to you existing name, and copy and update those five lines. After you do that, you should notice that the test is run once. > After I incorporate all feedback, I would of course like to commit > this to trunk. So, the only potential dangerous thing I saw was was unsetenv. In the past, there have been problems with it. I’m inclined to say Ok for trunk, but would like to give RMs or other maintainers a chance to say please no. Let’s give people a few days to comment on the patch.