You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.6 KiB

  1. #include <iostream>
  2. #include <list>
  3. #include <string>
  4. #include "storm-config.h"
  5. #include "gtest/gtest.h"
  6. #include "src/settings/SettingsManager.h"
  7. int main(int argc, char* argv[]) {
  8. storm::settings::initializeAll("StoRM (Functional) Testing Suite", "storm-functional-tests");
  9. std::cout << "StoRM (Functional) Testing Suite" << std::endl;
  10. testing::InitGoogleTest(&argc, argv);
  11. int result = RUN_ALL_TESTS();
  12. std::list<std::string> untestedModules;
  13. #ifndef STORM_HAVE_GUROBI
  14. untestedModules.push_back("Gurobi");
  15. #endif
  16. #ifndef STORM_HAVE_CUDA
  17. untestedModules.push_back("CUDA");
  18. #endif
  19. #ifndef STORM_HAVE_GLPK
  20. untestedModules.push_back("GLPK");
  21. #endif
  22. #ifndef STORM_HAVE_Z3
  23. untestedModules.push_back("Z3");
  24. #endif
  25. #ifndef STORM_HAVE_MSAT
  26. untestedModules.push_back("MathSAT");
  27. #endif
  28. #ifndef STORM_HAVE_INTELTBB
  29. untestedModules.push_back("Intel TBB");
  30. #endif
  31. #ifndef STORM_HAVE_CARL
  32. untestedModules.push_back("Carl");
  33. #endif
  34. if (result == 0) {
  35. if (untestedModules.empty()) {
  36. std::cout << std::endl << "ALL TESTS PASSED!" << std::endl;
  37. } else{
  38. std::cout << std::endl << "StoRM was built without the following optional dependencies: ";
  39. auto iter = untestedModules.begin();
  40. while (iter != untestedModules.end()) {
  41. std::cout << *iter;
  42. ++iter;
  43. if (iter != untestedModules.end()) {
  44. std::cout << ", ";
  45. }
  46. }
  47. std::cout << std::endl << "Functionality using that modules could not be tested." << std::endl << std::endl << "TESTS PASSED!" << std::endl;
  48. }
  49. } else{
  50. std::cout << std::endl << "TESTS FAILED!" << std::endl;
  51. }
  52. return result;
  53. }