From fb9cd6439aad49049cf66d72282b91da37d29e55 Mon Sep 17 00:00:00 2001 From: Brenden Blanco Date: Thu, 3 Mar 2016 15:24:35 -0800 Subject: [PATCH] Move python tests to tests/python They didn't quite make sense where they were. At one point 'cc' meant compiler, and yes they were testing the compiler. Now lets use the convention that different tests/ subdirectories test different bindings (c, python, other). Signed-off-by: Brenden Blanco --- tests/cc/CMakeLists.txt | 47 ------------------------------ tests/python/CMakeLists.txt | 48 +++++++++++++++++++++++++++++++ tests/{cc => python}/kprobe.b | 0 tests/{cc => python}/proto.b | 0 tests/{cc => python}/simulation.py | 0 tests/{cc => python}/test_array.py | 0 tests/{cc => python}/test_brb.c | 0 tests/{cc => python}/test_brb.py | 0 tests/{cc => python}/test_brb2.c | 0 tests/{cc => python}/test_brb2.py | 0 tests/{cc => python}/test_call1.c | 0 tests/{cc => python}/test_call1.py | 0 tests/{cc => python}/test_callchain.py | 0 tests/{cc => python}/test_clang.py | 0 tests/{cc => python}/test_clang_complex.c | 0 tests/{cc => python}/test_histogram.py | 0 tests/{cc => python}/test_probe_count.py | 0 tests/{cc => python}/test_stat1.b | 0 tests/{cc => python}/test_stat1.c | 0 tests/{cc => python}/test_stat1.py | 0 tests/{cc => python}/test_trace1.b | 0 tests/{cc => python}/test_trace1.py | 0 tests/{cc => python}/test_trace2.b | 0 tests/{cc => python}/test_trace2.c | 0 tests/{cc => python}/test_trace2.py | 0 tests/{cc => python}/test_trace3.c | 0 tests/{cc => python}/test_trace3.py | 0 tests/{cc => python}/test_trace4.py | 0 tests/{cc => python}/test_uprobes.py | 0 tests/{cc => python}/test_xlate1.b | 0 tests/{cc => python}/test_xlate1.c | 0 tests/{cc => python}/test_xlate1.py | 0 32 files changed, 48 insertions(+), 47 deletions(-) rename tests/{cc => python}/kprobe.b (100%) rename tests/{cc => python}/proto.b (100%) rename tests/{cc => python}/simulation.py (100%) rename tests/{cc => python}/test_array.py (100%) rename tests/{cc => python}/test_brb.c (100%) rename tests/{cc => python}/test_brb.py (100%) rename tests/{cc => python}/test_brb2.c (100%) rename tests/{cc => python}/test_brb2.py (100%) rename tests/{cc => python}/test_call1.c (100%) rename tests/{cc => python}/test_call1.py (100%) rename tests/{cc => python}/test_callchain.py (100%) rename tests/{cc => python}/test_clang.py (100%) rename tests/{cc => python}/test_clang_complex.c (100%) rename tests/{cc => python}/test_histogram.py (100%) rename tests/{cc => python}/test_probe_count.py (100%) rename tests/{cc => python}/test_stat1.b (100%) rename tests/{cc => python}/test_stat1.c (100%) rename tests/{cc => python}/test_stat1.py (100%) rename tests/{cc => python}/test_trace1.b (100%) rename tests/{cc => python}/test_trace1.py (100%) rename tests/{cc => python}/test_trace2.b (100%) rename tests/{cc => python}/test_trace2.c (100%) rename tests/{cc => python}/test_trace2.py (100%) rename tests/{cc => python}/test_trace3.c (100%) rename tests/{cc => python}/test_trace3.py (100%) rename tests/{cc => python}/test_trace4.py (100%) rename tests/{cc => python}/test_uprobes.py (100%) rename tests/{cc => python}/test_xlate1.b (100%) rename tests/{cc => python}/test_xlate1.c (100%) rename tests/{cc => python}/test_xlate1.py (100%) diff --git a/tests/cc/CMakeLists.txt b/tests/cc/CMakeLists.txt index 95916a3..476d086 100644 --- a/tests/cc/CMakeLists.txt +++ b/tests/cc/CMakeLists.txt @@ -1,50 +1,3 @@ # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") -find_program(ARPING arping) -if(ARPING STREQUAL "ARPING-NOTFOUND") - message(WARNING "Recommended test program 'arping' not found") -endif() -find_program(NETPERF netperf) -if(NETPERF STREQUAL "NETPERF-NOTFOUND") - message(WARNING "Recommended test program 'netperf' not found") -endif() -find_program(IPERF iperf) -if(IPERF STREQUAL "IPERF-NOTFOUND") - message(WARNING "Recommended test program 'iperf' not found") -endif() - -add_test(NAME py_test_stat1_b WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_stat1_b namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_stat1.py test_stat1.b proto.b) -add_test(NAME py_test_stat1_c WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_stat1_c namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_stat1.py test_stat1.c) -#add_test(NAME py_test_xlate1_b WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -# COMMAND ${TEST_WRAPPER} py_xlate1_b namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_xlate1.py test_xlate1.b proto.b) -add_test(NAME py_test_xlate1_c WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_xlate1_c namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_xlate1.py test_xlate1.c) -add_test(NAME py_test_call1 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_call1_c namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_call1.py test_call1.c) -add_test(NAME py_test_trace1 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_trace1 sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_trace1.py test_trace1.b kprobe.b) -add_test(NAME py_test_trace2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_trace2 sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_trace2.py) -add_test(NAME py_test_trace3_c WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_trace3_c sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_trace3.py test_trace3.c) -add_test(NAME py_test_trace4 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_trace4 sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_trace4.py) -add_test(NAME py_test_probe_count WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_probe_count sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_probe_count.py) -add_test(NAME py_test_brb WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_brb_c sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_brb.py test_brb.c) -add_test(NAME py_test_brb2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_brb2_c sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_brb2.py test_brb2.c) -add_test(NAME py_test_clang WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_clang sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_clang.py) -add_test(NAME py_test_histogram WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_histogram sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_histogram.py) -add_test(NAME py_test_callchain WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_callchain sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_callchain.py) -add_test(NAME py_array WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_array sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_array.py) -add_test(NAME py_uprobes WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${TEST_WRAPPER} py_uprobes sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_uprobes.py) diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 911abbf..bfa2e98 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -1,5 +1,53 @@ # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") +find_program(ARPING arping) +if(ARPING STREQUAL "ARPING-NOTFOUND") + message(WARNING "Recommended test program 'arping' not found") +endif() +find_program(NETPERF netperf) +if(NETPERF STREQUAL "NETPERF-NOTFOUND") + message(WARNING "Recommended test program 'netperf' not found") +endif() +find_program(IPERF iperf) +if(IPERF STREQUAL "IPERF-NOTFOUND") + message(WARNING "Recommended test program 'iperf' not found") +endif() + +add_test(NAME py_test_stat1_b WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_stat1_b namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_stat1.py test_stat1.b proto.b) +add_test(NAME py_test_stat1_c WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_stat1_c namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_stat1.py test_stat1.c) +#add_test(NAME py_test_xlate1_b WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +# COMMAND ${TEST_WRAPPER} py_xlate1_b namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_xlate1.py test_xlate1.b proto.b) +add_test(NAME py_test_xlate1_c WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_xlate1_c namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_xlate1.py test_xlate1.c) +add_test(NAME py_test_call1 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_call1_c namespace ${CMAKE_CURRENT_SOURCE_DIR}/test_call1.py test_call1.c) +add_test(NAME py_test_trace1 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_trace1 sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_trace1.py test_trace1.b kprobe.b) +add_test(NAME py_test_trace2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_trace2 sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_trace2.py) +add_test(NAME py_test_trace3_c WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_trace3_c sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_trace3.py test_trace3.c) +add_test(NAME py_test_trace4 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_trace4 sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_trace4.py) +add_test(NAME py_test_probe_count WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_probe_count sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_probe_count.py) +add_test(NAME py_test_brb WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_brb_c sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_brb.py test_brb.c) +add_test(NAME py_test_brb2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_brb2_c sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_brb2.py test_brb2.c) +add_test(NAME py_test_clang WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_clang sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_clang.py) +add_test(NAME py_test_histogram WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_histogram sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_histogram.py) +add_test(NAME py_test_callchain WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_callchain sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_callchain.py) +add_test(NAME py_array WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_array sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_array.py) +add_test(NAME py_uprobes WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${TEST_WRAPPER} py_uprobes sudo ${CMAKE_CURRENT_SOURCE_DIR}/test_uprobes.py) + add_test(NAME py_test_dump_func WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${TEST_WRAPPER} py_dump_func simple ${CMAKE_CURRENT_SOURCE_DIR}/test_dump_func.py) diff --git a/tests/cc/kprobe.b b/tests/python/kprobe.b similarity index 100% rename from tests/cc/kprobe.b rename to tests/python/kprobe.b diff --git a/tests/cc/proto.b b/tests/python/proto.b similarity index 100% rename from tests/cc/proto.b rename to tests/python/proto.b diff --git a/tests/cc/simulation.py b/tests/python/simulation.py similarity index 100% rename from tests/cc/simulation.py rename to tests/python/simulation.py diff --git a/tests/cc/test_array.py b/tests/python/test_array.py similarity index 100% rename from tests/cc/test_array.py rename to tests/python/test_array.py diff --git a/tests/cc/test_brb.c b/tests/python/test_brb.c similarity index 100% rename from tests/cc/test_brb.c rename to tests/python/test_brb.c diff --git a/tests/cc/test_brb.py b/tests/python/test_brb.py similarity index 100% rename from tests/cc/test_brb.py rename to tests/python/test_brb.py diff --git a/tests/cc/test_brb2.c b/tests/python/test_brb2.c similarity index 100% rename from tests/cc/test_brb2.c rename to tests/python/test_brb2.c diff --git a/tests/cc/test_brb2.py b/tests/python/test_brb2.py similarity index 100% rename from tests/cc/test_brb2.py rename to tests/python/test_brb2.py diff --git a/tests/cc/test_call1.c b/tests/python/test_call1.c similarity index 100% rename from tests/cc/test_call1.c rename to tests/python/test_call1.c diff --git a/tests/cc/test_call1.py b/tests/python/test_call1.py similarity index 100% rename from tests/cc/test_call1.py rename to tests/python/test_call1.py diff --git a/tests/cc/test_callchain.py b/tests/python/test_callchain.py similarity index 100% rename from tests/cc/test_callchain.py rename to tests/python/test_callchain.py diff --git a/tests/cc/test_clang.py b/tests/python/test_clang.py similarity index 100% rename from tests/cc/test_clang.py rename to tests/python/test_clang.py diff --git a/tests/cc/test_clang_complex.c b/tests/python/test_clang_complex.c similarity index 100% rename from tests/cc/test_clang_complex.c rename to tests/python/test_clang_complex.c diff --git a/tests/cc/test_histogram.py b/tests/python/test_histogram.py similarity index 100% rename from tests/cc/test_histogram.py rename to tests/python/test_histogram.py diff --git a/tests/cc/test_probe_count.py b/tests/python/test_probe_count.py similarity index 100% rename from tests/cc/test_probe_count.py rename to tests/python/test_probe_count.py diff --git a/tests/cc/test_stat1.b b/tests/python/test_stat1.b similarity index 100% rename from tests/cc/test_stat1.b rename to tests/python/test_stat1.b diff --git a/tests/cc/test_stat1.c b/tests/python/test_stat1.c similarity index 100% rename from tests/cc/test_stat1.c rename to tests/python/test_stat1.c diff --git a/tests/cc/test_stat1.py b/tests/python/test_stat1.py similarity index 100% rename from tests/cc/test_stat1.py rename to tests/python/test_stat1.py diff --git a/tests/cc/test_trace1.b b/tests/python/test_trace1.b similarity index 100% rename from tests/cc/test_trace1.b rename to tests/python/test_trace1.b diff --git a/tests/cc/test_trace1.py b/tests/python/test_trace1.py similarity index 100% rename from tests/cc/test_trace1.py rename to tests/python/test_trace1.py diff --git a/tests/cc/test_trace2.b b/tests/python/test_trace2.b similarity index 100% rename from tests/cc/test_trace2.b rename to tests/python/test_trace2.b diff --git a/tests/cc/test_trace2.c b/tests/python/test_trace2.c similarity index 100% rename from tests/cc/test_trace2.c rename to tests/python/test_trace2.c diff --git a/tests/cc/test_trace2.py b/tests/python/test_trace2.py similarity index 100% rename from tests/cc/test_trace2.py rename to tests/python/test_trace2.py diff --git a/tests/cc/test_trace3.c b/tests/python/test_trace3.c similarity index 100% rename from tests/cc/test_trace3.c rename to tests/python/test_trace3.c diff --git a/tests/cc/test_trace3.py b/tests/python/test_trace3.py similarity index 100% rename from tests/cc/test_trace3.py rename to tests/python/test_trace3.py diff --git a/tests/cc/test_trace4.py b/tests/python/test_trace4.py similarity index 100% rename from tests/cc/test_trace4.py rename to tests/python/test_trace4.py diff --git a/tests/cc/test_uprobes.py b/tests/python/test_uprobes.py similarity index 100% rename from tests/cc/test_uprobes.py rename to tests/python/test_uprobes.py diff --git a/tests/cc/test_xlate1.b b/tests/python/test_xlate1.b similarity index 100% rename from tests/cc/test_xlate1.b rename to tests/python/test_xlate1.b diff --git a/tests/cc/test_xlate1.c b/tests/python/test_xlate1.c similarity index 100% rename from tests/cc/test_xlate1.c rename to tests/python/test_xlate1.c diff --git a/tests/cc/test_xlate1.py b/tests/python/test_xlate1.py similarity index 100% rename from tests/cc/test_xlate1.py rename to tests/python/test_xlate1.py -- 2.7.4