(testName, requestString)
| 57 | |
| 58 | |
| 59 | def buildMetaTest(testName, requestString): |
| 60 | tr = Test.AddTestRun(testName) |
| 61 | global isFirstTest |
| 62 | if isFirstTest: |
| 63 | isFirstTest = False |
| 64 | tr.Processes.Default.StartBefore(ts) |
| 65 | tr.Processes.Default.StartBefore(redirect_serv, ready=When.PortOpen(redirect_serv.Variables.Port)) |
| 66 | tr.Processes.Default.StartBefore(dns) |
| 67 | |
| 68 | requestCommandPath = os.path.join(data_path, tr.Name) |
| 69 | with open(requestCommandPath, 'w') as f: |
| 70 | f.write(requestString) |
| 71 | tr.Processes.Default.Command = \ |
| 72 | (f"{sys.executable} tcp_client.py 127.0.0.1 {ts.Variables.port} " |
| 73 | f"{requestCommandPath} | head -1") |
| 74 | tr.ReturnCode = 0 |
| 75 | tr.Processes.Default.Streams.stdout = gold_filepath |
| 76 | tr.StillRunningAfter = ts |
| 77 | tr.StillRunningAfter = redirect_serv |
| 78 | tr.StillRunningAfter = dns |
| 79 | |
| 80 | |
| 81 | buildMetaTest( |
no test coverage detected