Browse Source

Merge pull request #2316 from TechEmpower/nuke-tmp

Nuke tmp
Mike Smith 8 years ago
parent
commit
43476b03c4
2 changed files with 9 additions and 3 deletions
  1. 8 0
      toolset/benchmark/benchmarker.py
  2. 1 3
      toolset/benchmark/framework_test.py

+ 8 - 0
toolset/benchmark/benchmarker.py

@@ -610,6 +610,14 @@ class Benchmarker:
           pass
         passed_verify = test.verify_urls(verificationPath)
 
+        ##########################
+        # Nuke /tmp
+        ##########################
+        try:
+          subprocess.check_call('sudo rm -rf /tmp/*', shell=True, stderr=out, stdout=out)
+        except Exception:
+          out.write(header("Error: Could not empty /tmp"))
+
         ##########################
         # Benchmark this test
         ##########################

+ 1 - 3
toolset/benchmark/framework_test.py

@@ -28,7 +28,7 @@ from datetime import datetime
 from datetime import timedelta
 
 class FrameworkTest:
-  headers_template = "-H 'Host: localhost' -H '{accept}' -H 'Connection: keep-alive'"
+  headers_template = "-H 'Host: localhost' -H 'Accept: {accept}' -H 'Connection: keep-alive'"
  
   # Used for test types that require no pipelining or query string params.
   concurrency_template = """
@@ -492,8 +492,6 @@ class FrameworkTest:
         pprint(results)
 
         self.benchmarker.report_benchmark_results(framework=self, test=test_type, results=results['results'])
-        rmtmp = "find /tmp -maxdepth 1 -name \"*\" -print0 | xargs -0 sudo -u %s rm" % (self.benchmarker.runner_user)
-        subprocess.Popen(rmtmp, shell=True, cwd=self.fwroot, executable='/bin/bash')
         out.write( "Complete\n" )
         out.flush()