Ensembles/ert — pull request #329 by joakim-hove (2014-01-13 17:25:06+00:00)
Title: Ert test context

This PR introduces the two jobs ANALYSIS_UPDATE and ANALYSIS_ENKF_UPDATE.

In addition it introduces the type ert_test_context which is utility structure for testing situations where a full ert spacesship must be set up before the testing can start:

```C
#include
/*
Must link with the ert-test library.
*/

void test_it( const char * config_file , const char * site_config /* Cna be NULL */) {
ert_test_context_type * test_context = ert_test_context_alloc( "TEST" , config_file , site_config );
enkf_main_type * enkf_main = ert_tst_context_get_main( test_context );
// Do your thing with the enkf_main instance.
ert_test_context_free( test_context );
}

int main( int argc , char ** argv) {
const char * config_file = argv[1];
test_it( config_file , NULL );
exit(0);
}
```

The ert_test_context will create a temporary testing area and copy the config file and all related files there. The test area will be cleaned up on exit.