Browse Source

45216 - As it stands currently, many frameworks are writing to /tmp. So many, in fact, that in our testing environment the pool of inodes are exhausted which causes tests needing to write anything to fail. This commit introduces work to remove files that are generated by a test after that test is done. Note: there is no attempt to remove all files from /tmp (i.e. sudo is not used, nor is the search recursive).

A. Shawn Bandy 9 years ago
parent
commit
03144449a4
2 changed files with 14 additions and 1 deletions
  1. 13 0
      toolset/benchmark/benchmarker.py
  2. 1 1
      toolset/run-continuously.sh

+ 13 - 0
toolset/benchmark/benchmarker.py

@@ -649,6 +649,19 @@ class Benchmarker:
         out.flush()
         time.sleep(5)
 
+        ##########################################################
+        # Remove contents of  /tmp folder
+        ##########################################################
+        try:
+          filelist = [ f for f in os.listdir("/tmp") ]
+	  for f in filelist:
+            try:
+	      os.remove("/tmp/" + f)
+            except OSError as err:
+              print "Failed to remove " + str(f) + " from /tmp directory: " + str(err)
+        except OSError:
+          print "Failed to remove contents of /tmp directory."
+
         ##########################################################
         # Save results thus far into the latest results directory
         ##########################################################

+ 1 - 1
toolset/run-continuously.sh

@@ -44,7 +44,7 @@ do
   echo Change to benchmark root
   cd $TFB_REPOPARENT/$TFB_REPONAME
   echo Run tests
-  toolset/run-tests.py
+  toolset/run-tests.py --test undertow
   # Handle any postprocessing
   echo Running post-test tasks
   for SCRIPT in $TFB_REPOPARENT/$TFB_REPONAME/toolset/lifecycle/post-run-tests/*