1 #include <iostream>
2 
3 #include <gtest/gtest.h>
4 
5 #include "chainerx/backend.h"
6 #include "chainerx/context.h"
7 #include "chainerx/testing/util.h"
8 
main(int argc,char ** argv)9 int main(int argc, char** argv) {
10     ::testing::InitGoogleTest(&argc, argv);
11     int status = RUN_ALL_TESTS();
12 
13     if (chainerx::testing::testing_internal::GetSkippedNativeTestCount() > 0) {
14         chainerx::Context ctx;
15         chainerx::Backend& backend = ctx.GetBackend("native");
16         std::cout << "[  SKIPPED ] " << chainerx::testing::testing_internal::GetSkippedNativeTestCount()
17                   << " NATIVE tests requiring devices more than " << chainerx::testing::testing_internal::GetDeviceLimit(backend) << "."
18                   << std::endl;
19     }
20 #ifdef CHAINERX_ENABLE_CUDA
21     if (chainerx::testing::testing_internal::GetSkippedCudaTestCount() > 0) {
22         chainerx::Context ctx;
23         chainerx::Backend& backend = ctx.GetBackend("cuda");
24         std::cout << "[  SKIPPED ] " << chainerx::testing::testing_internal::GetSkippedCudaTestCount()
25                   << " CUDA tests requiring devices more than " << chainerx::testing::testing_internal::GetDeviceLimit(backend) << "."
26                   << std::endl;
27     }
28 #endif  // CHAINERX_ENABLE_CUDA
29 
30     return status;
31 }
32