From 7d2d1cac55d3e152395a676801cbba8451b072b1 Mon Sep 17 00:00:00 2001
From: David_Korzeniewski <david.korzeniewski@rwth-aachen.de>
Date: Wed, 25 Feb 2015 15:18:40 +0100
Subject: [PATCH] Functional Testing Suite now prints a note if not all
 optional dependencies were included in the build.

Former-commit-id: 36974ebb66bcb2f224c93eab1f2d2b5448e43543
---
 test/functional/storm-functional-tests.cpp | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/test/functional/storm-functional-tests.cpp b/test/functional/storm-functional-tests.cpp
index 648fe8df0..30709a39d 100644
--- a/test/functional/storm-functional-tests.cpp
+++ b/test/functional/storm-functional-tests.cpp
@@ -1,4 +1,6 @@
 #include <iostream>
+#include <list>
+#include <string>
 
 #include "gtest/gtest.h"
 #include "log4cplus/logger.h"
@@ -38,5 +40,45 @@ int main(int argc, char* argv[]) {
     int result = RUN_ALL_TESTS();
     
     logger.closeNestedAppenders();
+
+	std::list<std::string> untestedModules;
+#ifndef STORM_HAVE_GUROBI
+	untestedModules.push_back("Gurobi");
+#endif
+#ifndef STORM_HAVE_CUDA
+	untestedModules.push_back("CUDA");
+#endif
+#ifndef STORM_HAVE_GLPK
+	untestedModules.push_back("GLPK");
+#endif
+#ifndef STORM_HAVE_Z3
+	untestedModules.push_back("Z3");
+#endif
+#ifndef STORM_HAVE_MSAT
+	untestedModules.push_back("MathSAT");
+#endif
+#ifndef STORM_HAVE_INTELTBB
+	untestedModules.push_back("Intel TBB");
+#endif
+	
+	if (result == 0) {
+		if (untestedModules.empty()) {
+			std::cout << std::endl << "ALL TESTS PASSED!" << std::endl;
+		} else{
+			std::cout << std::endl << "StoRM was built without the following optional dependencies: ";
+			auto iter = untestedModules.begin();
+			while (iter != untestedModules.end()) {
+				std::cout << *iter;
+				++iter;
+				if (iter != untestedModules.end()) {
+					std::cout << ", ";
+				}
+			}
+			std::cout << std::endl << "Functionality using that modules could not be tested." << std::endl << std::endl << "TESTS PASSED!" << std::endl;
+		}
+	} else{
+		std::cout << std::endl << "TESTS FAILED!" << std::endl;
+	}
+
     return result;
 }