summaryrefslogtreecommitdiff
path: root/unit_tests/test_caffe_main.cpp
blob: ee0dcd4a57d705cff4b44299769b12756eddc42a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "caffe/caffe.hpp"
#include "caffe/test/test_caffe_main.hpp"

extern "C" {
#include "testbed.h"
}

class testbed_env: public ::testing::Environment {

  public:
      testbed_env(){};
      ~testbed_env() {};

    void SetUp(void) 
    { 
         std::cout<<"setting up testbed resource"<<std::endl;
    }

    void TearDown(void) 
    { 
        std::cout<<"release testbed resource"<<std::endl;
    }

};


int main(int argc, char** argv) {
  ::testing::InitGoogleTest(&argc, argv);
  caffe::GlobalInit(&argc, &argv);

  ::testing::AddGlobalTestEnvironment(new testbed_env);
  // invoke the test.
  return RUN_ALL_TESTS();
}