harness: fixed tfpt test
[barrelfish] / tools / harness / tests / tftp.py
index fbde7e5..025cd43 100644 (file)
@@ -16,7 +16,8 @@ class TftpClientTest(TestCommon):
 
     def setup_tftp_file(self, tftpdir):
         with open(os.path.join(tftpdir, self._filename), 'w') as f:
-            f.write(self._filecontents)
+            for x in range(0, 1000):
+                f.write(self._filecontents)
 
 
     def setup(self, build, machine, testdir):
@@ -34,13 +35,19 @@ class TftpClientTest(TestCommon):
         modules.add_module("netd", ["auto"])
         return modules
 
+    def is_finished(self, line):
+        if 'TFTP TEST DONE.' in line:
+            return True
+        else:
+            return False
+
     def get_finish_string(self):
-        return "TFTP TEST DONE."
+        return 'TFTP TEST DONE.'
 
     def process_data(self, testdir, rawiter):
         passed = False
         for line in rawiter:
-            if self._filecontents in line:
+            if self.get_finish_string() in line:
                 passed = True
 
         return PassFailResult(passed)