diff options
author | 2016-02-10 10:46:04 +0200 | |
---|---|---|
committer | 2016-02-10 10:46:04 +0200 | |
commit | d673fcc4f798ac260f467abb8848d3d39fc861aa (patch) | |
tree | 13ba764765092436a28b736d55ebb1444ec08bfb /scripts/automation/regression | |
parent | ede68c669fde984d6095e9313d49a8af295ae885 (diff) | |
parent | a01110c1054d6f5509eee9ad014461742f049514 (diff) |
Merge more tests
Diffstat (limited to 'scripts/automation/regression')
-rw-r--r-- | scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py index 0a25c0ac..7d17d0e2 100644 --- a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py +++ b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py @@ -116,7 +116,21 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): finally: os.unlink(output_cap) - + + def run_py_profile_path (self, profile, options,silent = False, do_no_remove=False,compare =True): + output_cap = "a.pcap" + input_file = os.path.join('stl/profiles/', profile) + golden_file = os.path.join('exp',os.path.basename(profile).split('.')[0]+'.pcap'); + try: + rc = self.run_sim(input_file, output_cap, options, silent) + assert_equal(rc, True) + if compare: + self.compare_caps(output_cap, golden_file) + finally: + if not do_no_remove: + os.unlink(output_cap) + + # test for IMIX def test_imix (self): @@ -130,6 +144,27 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): def test_tuple_gen (self): self.golden_run("basic_tuple_gen", "imix_tuple_gen", "-m 50kpps --limit 500 --cores 8", silent = False) + def test_all_profiles (self): + p=[ + ["udp_1pkt_1mac_override.py","-m 1 -l 50",True], + ["syn_attack.py","-m 1 -l 50",False], # can't compare random now + ["udp_1pkt_1mac.py","-m 1 -l 50",True], + ["udp_1pkt_mac.py","-m 1 -l 50",True], + ["udp_1pkt.py","-m 1 -l 50",True], + ["udp_1pkt_tuple_gen.py","-m 1 -l 50",True], + ["udp_rand_len_9k.py","-m 1 -l 50",False], # can't do the compare + ["udp_1pkt_mpls.py","-m 1 -l 50",True], + ["udp_1pkt_mpls_vm.py","-m 1 ",True], + ["imix.py","-m 1 -l 100",True], + ["udp_inc_len_9k.py","-m 1 -l 100",True] + ]; + + #p=[ ["udp_inc_len_9k.py","-m 1 -l 100",True] ] + + for obj in p: + self.run_py_profile_path (obj[0],obj[1],compare =obj[2], do_no_remove=False) + + # valgrind tests def test_valgrind_various_profiles (self): |