Autotest's Directory Structure

Where should I put the files I'm adding?

Is this a generic module that will be useful on on both the client and the server? Then put it in client/common_lib. Don't forget to add the module name to __all__ in client/common_lib/__init__.py. Or, if this module is providing site-specific functions for use on your local server, add the name to the libraries variable in client/common_lib/site_libraries.

Are you adding code to the client? Then put it in client/bin. Remember that this code will only be accessible from other client code (and client-side tests), not from server code. Even though the server has a copy of the client, it generally avoids reaching into the client to import code (except for a few special cases). If you want to use your client code from the server as well then put it in the common library, not on the client.

Are you adding code on the server? If it's a new kind of host, add it in server/hosts. Be sure to add an import for you new kind of host to server/hosts/__init__.py, since the server code will import host classes by pulling in the whole host package, rather than importing classes from specific submodules.

Are you adding tests? Client-side tests should be added in client/tests, in their own directories. Server-side tests should go into server/tests, again in their own directories.

DirectoryStructure (last edited 2008-01-10 23:37:18 by jadmanski)