From: Bruce Richardson Date: Tue, 11 Feb 2014 16:33:41 +0000 (+0000) Subject: app/test: conditionalize on timer enabled X-Git-Tag: spdx-start~11007 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8ec70d19f5fb940a1085cdad992eba94e8f823d0;p=dpdk.git app/test: conditionalize on timer enabled don't compile the timer autotests unless timer library is turned on in the compile-time configuration. Signed-off-by: Bruce Richardson --- diff --git a/app/test/test_timer.c b/app/test/test_timer.c index 03d3d6e951..3945ed8ebf 100644 --- a/app/test/test_timer.c +++ b/app/test/test_timer.c @@ -31,6 +31,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "test.h" + +#ifdef RTE_LIBRTE_TIMER /* * Timer * ===== @@ -138,7 +141,6 @@ #include #include -#include "test.h" #define TEST_DURATION_S 20 /* in seconds */ #define NB_TIMER 4 @@ -519,3 +521,13 @@ test_timer(void) return 0; } + +#else + +int +test_timer(void) +{ + return 0; +} + +#endif diff --git a/app/test/test_timer_perf.c b/app/test/test_timer_perf.c index edaf308bd4..632cc6c8a1 100644 --- a/app/test/test_timer_perf.c +++ b/app/test/test_timer_perf.c @@ -31,6 +31,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "test.h" + +#ifdef RTE_LIBRTE_TIMER #include #include #include @@ -40,7 +43,6 @@ #include #include #include -#include "test.h" #define MAX_ITERATIONS 1000000 @@ -156,3 +158,13 @@ test_timer_perf(void) return 0; } + +#else + +int +test_timer_perf(void) +{ + return 0; +} + +#endif