Browse Source

Added check for proper installation of wrk before running the tests in benchmarker.py

haleyyoung 11 years ago
parent
commit
2665a4bcec
1 changed files with 4 additions and 0 deletions
  1. 4 0
      toolset/benchmark/benchmarker.py

+ 4 - 0
toolset/benchmark/benchmarker.py

@@ -110,6 +110,10 @@ class Benchmarker:
     self.__setup_database()
     self.__setup_client()
 
+    # Check if wrk (and wrk-pipeline) is installed and executable, if not, raise an exception
+    if not (os.access("/usr/local/bin/wrk", os.X_OK) and os.access("/usr/local/bin/wrk-pipeline", os.X_OK)):
+      raise Exception("wrk and/or wrk-pipeline are not properly installed. Not running tests.")
+
     ##########################
     # Run tests
     ##########################