From 3a11ae353d3fe727b2ddca101ddf9c14a7c8f86e Mon Sep 17 00:00:00 2001 From: Craig Dowell Date: Mon, 28 Sep 2009 21:57:59 -0700 Subject: [PATCH] update tcp interop response vectors --- .../ns3tcp-interop-response-vectors.pcap | Bin 3696 -> 3696 bytes src/test/ns3tcp/ns3tcp-interop-test-suite.cc | 2 +- src/test/ns3tcp/waf | 0 test.py | 20 +++++++++++++++++- 4 files changed, 20 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/test/ns3tcp/waf diff --git a/src/test/ns3tcp/ns3tcp-interop-response-vectors.pcap b/src/test/ns3tcp/ns3tcp-interop-response-vectors.pcap index 8280e07d14b44c6b82d63754a543f68366d42901..12fe86e356beedb9e646f30f203d1dd71caa33dc 100644 GIT binary patch delta 14 Vcmew$^Fd~UDD%UkZW|>c_y93*1>67t delta 14 Vcmew$^Fd~UDD&!sri~I2d;l)Q1$_Vj diff --git a/src/test/ns3tcp/ns3tcp-interop-test-suite.cc b/src/test/ns3tcp/ns3tcp-interop-test-suite.cc index c70dbd6fe..c1e7d9d5a 100644 --- a/src/test/ns3tcp/ns3tcp-interop-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-interop-test-suite.cc @@ -36,7 +36,7 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("Ns3TcpInteropTest"); -const bool WRITE_VECTORS = false; // hack hack hack +const bool WRITE_VECTORS = false; // set to true to write response vectors const uint32_t PCAP_LINK_TYPE = 1187373553; // Some large random number -- we use to verify data was written by this program const uint32_t PCAP_SNAPLEN = 64; // Don't bother to save much data diff --git a/src/test/ns3tcp/waf b/src/test/ns3tcp/waf old mode 100644 new mode 100755 diff --git a/test.py b/test.py index b9f7fc484..ded7298e6 100755 --- a/test.py +++ b/test.py @@ -654,6 +654,7 @@ def run_tests(): # Dispatching will run with unlimited speed and the worker threads will # execute as fast as possible from the queue. # + total_tests = 0 for test in suite_list: if len(test): job = Job() @@ -669,6 +670,7 @@ def run_tests(): input_queue.put(job) jobs = jobs + 1 + total_tests = total_tests + 1 # # We've taken care of the discovered or specified test suites. Now we @@ -728,6 +730,8 @@ def run_tests(): input_queue.put(job) jobs = jobs + 1 + total_tests = total_tests + 1 + elif len(options.example): # # If you tell me to run an example, I will try and run the example @@ -746,6 +750,7 @@ def run_tests(): input_queue.put(job) jobs = jobs + 1 + total_tests = total_tests + 1 # # Tell the worker threads to pack up and go home for the day. Each one @@ -766,6 +771,9 @@ def run_tests(): # ignore them. If there are real results, we always print PASS or FAIL to # standard out as a quick indication of what happened. # + passed_tests = 0 + failed_tests = 0 + crashed_tests = 0 for i in range(jobs): job = output_queue.get() if job.is_break: @@ -778,8 +786,13 @@ def run_tests(): if job.returncode == 0: status = "PASS" - else: + passed_tests = passed_tests + 1 + elif job.returncode == 1: + failed_tests = failed_tests + 1 status = "FAIL" + else: + crashed_tests = crashed_tests + 1 + status = "CRASH" print "%s: %s %s" % (status, kind, job.display_name) @@ -860,6 +873,11 @@ def run_tests(): f.write('\n') f.close() + # + # Print a quick summary of events + # + print "%d of %d tests passed (%d passed, %d failed, %d crashed)" % (passed_tests, total_tests, passed_tests, + failed_tests, crashed_tests) # # The last things to do are to translate the XML results file to "human # readable form" if the user asked for it (or make an XML file somewhere)