dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What to do with setup_{host, target, build}_hook and cleanup_target_hook


From: Jacob Bachmeyer
Subject: What to do with setup_{host, target, build}_hook and cleanup_target_hook procedures?
Date: Fri, 01 Feb 2019 18:30:50 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0

First, some of the behavior that I will be documenting for loading testsuite configuration (which is on the "testsuite" side of DejaGnu) is actually implemented in setup_target_hook, which is a customization point on the "testing lab" side of DejaGnu. Similarly, the call to ${tool}_exit is actually in cleanup_target_hook, with the same problem -- behavior on which testsuites should be able to rely is conflated with test lab customization points.

Second, the setup_*_hook procedures all set internal variables that test lab configuration should not have to worry about.

Third, there is a cleanup_target_hook, but no cleanup hooks for host or build. This is an odd asymmetry.

I propose:
   1.  Add cleanup_{build,host}_hook procedures.
2. Ensure that all *_hook procedures are empty and move all framework-related code to new procedures.

Most sites that simply install DejaGnu and run tests locally should be unaffected by these changes. I suspect that even most sites that have global configuration files probably are not overriding the *_hook procedures and will also not be affected. Those few sites that will be affected by this are presumably run by people who will notice the item in NEWS that default processing for *_hook procedures has been moved elsewhere and adjust their configurations accordingly.


-- Jacob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]