harness: webserver tests added test using e10k/solarflare
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Thu, 21 Sep 2017 14:41:39 +0000 (16:41 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Thu, 21 Sep 2017 14:41:39 +0000 (16:41 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

tools/harness/tests/webserver.py

index ba5a9e0..c5a519d 100644 (file)
@@ -100,7 +100,7 @@ class WebserverTest(WebCommon):
         self.testlog = None
 
     def getpage_stress(self, server, page, count):
-        debug.verbose('requesting http://%s/%s' % (server, page))
+        debug.verbose('requesting http://%s/%s' % (server, page))  
         failure_count = 0;
         #c = httplib.HTTPConnection(server, timeout=WEBSERVER_TIMEOUT)
         for i in range(count):
@@ -213,6 +213,35 @@ class WebserverTest(WebCommon):
 
 
 @tests.add_test
+class WebserverTestSf(WebserverTest):
+    '''tests webserver functionality solarflare'''
+    name = "webserver_sf"
+    def get_modules(self, build, machine):
+        modules = super(WebCommon, self).get_modules(build, machine)
+        modules.add_module("sfn5122f", ["auto"])
+        modules.add_module("net_sockets_server", ["nospawn"])
+        nfsip = socket.gethostbyname(siteconfig.get('WEBSERVER_NFS_HOST'))
+        modules.add_module("webserver", ["core=%d" % machine.get_coreids()[0], #2
+                               nfsip, siteconfig.get('WEBSERVER_NFS_PATH')])
+        return modules
+   
+@tests.add_test
+class WebserverTestE10k(WebserverTest):
+    '''tests webserver functionality e10k'''
+    name = "webserver_e10k"
+    def get_modules(self, build, machine):
+        modules = super(WebCommon, self).get_modules(build, machine)
+        modules.add_module("e10k", ["auto"])
+        modules.add_module("net_sockets_server", ["nospawn"])
+        nfsip = socket.gethostbyname(siteconfig.get('WEBSERVER_NFS_HOST'))
+        modules.add_module("webserver", ["core=%d" % machine.get_coreids()[0], #2
+                               nfsip, siteconfig.get('WEBSERVER_NFS_PATH')])
+        return modules
+
+
+@tests.add_test
 class HTTPerfTest(WebCommon):
     '''httperf webserver performance benchmark'''
     name = "httperf"
@@ -378,7 +407,6 @@ class HTTPerfTest(WebCommon):
 
         return final
 
-
 class HTTPerfResults(ResultsBase):
     _err_fields = 'fd_unavail addrunavail ftab_full other_err'.split()
     _result_fields = ('client_timo socket_timo connrefused connreset'