OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
unit_test_init_cleanup.hpp
1/*
2 * unit_test_init_cleanup.hpp
3 *
4 * Created on: Apr 17, 2015
5 * Author: Pietro Incardona
6 */
7
8#ifndef UNIT_TEST_INIT_CLEANUP_HPP_
9#define UNIT_TEST_INIT_CLEANUP_HPP_
10
11#include "util/cudify/cudify.hpp"
12
14struct ut_start
15{
16
19 {
20#ifdef CUDA_ON_CPU
21 init_wrappers();
22#endif
23#ifdef PERFORMANCE_TEST
24 test_dir = getenv("OPENFPM_PERFORMANCE_TEST_DIR");
25
26 if (test_dir == NULL)
27 {
28 std::cerr << "Error: " __FILE__ << ":" << __LINE__ << " in order to run the performance test you must set the environment variable $OPENFPM_PERFORMANCE_TEST_DIR to the test or an empty directory";
29 exit(1);
30 }
31#endif
32
33 }
34
37 {
38 }
39};
40
41//____________________________________________________________________________//
42
43BOOST_GLOBAL_FIXTURE( ut_start );
44
45
46
47#endif /* UNIT_TEST_INIT_CLEANUP_HPP_ */
boost unit test fixation (start procedure to call before testing)
ut_start()
start procedure before running the test
~ut_start()
post procedure to call after the test