From patchwork Thu Feb 15 19:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 128522 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp2075529ljc; Thu, 15 Feb 2018 11:01:04 -0800 (PST) X-Google-Smtp-Source: AH8x225My2NypdAg8aXIGoq0ibHGfSjSARQMLfd7uFf+ovXagDnIC9gnQw3FoSdZZNLQ80k0me2l X-Received: by 10.200.47.154 with SMTP id l26mr5579971qta.195.1518721264115; Thu, 15 Feb 2018 11:01:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518721264; cv=none; d=google.com; s=arc-20160816; b=gvfFW0BzowslsWvU/3GghlCfmNW/BcnXbjy6DfUXlfcZNMLUczAn22jQB9rkoJjnhr ivkEUJZWM8SLnlwdv/HE1HStLx5py7+58J3EjvqK2Z0quG2gi6/WFefs2Rspyi7474sP pQ9oBmkR6oGzZ6IOM11UdIeyfDxlWEjy/xWrNvZEyg1Idi9EOL4UkGz2G/QGJCinAalz obWyqE9Ez/6T96HtTJzlcj0SLBi/q8A/Yx+ltJxXCP4MPYelm+dRkbcQ/uUYv5cTNYgX QrHGkloU9m9K/FP+dWt07GaoYmMGer5QREUkvQHA24PsglXNBeuV15FuzC9sdPgNYva6 q4Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=P8fSo9D4f0vIkGy+hMuUBNrQAPr3QYewco14W3ulU4Q=; b=cBdoi+E0oGaPqiJ+lnrymA9jjRjfRgy9AVZAnZYxBlwc61DLyq21HUHGVAHAkajCO9 IgT4tEr/L2pkRcOA3gYkrt++wqHHpUjImA4NrJ8W9w1yyLOevQlmAEha6yzOdKFwJVM7 PWyf7OIVHEex3uSLz4CBBSEO411ik2TJto5YC+5x5QIl/fIG9X6jG9I2REgAF6wkMJyN ADGHV178gwNyO/7AMqfB5PTL7UpeEoZKfo28z6wHgm3fd7pRwQ57goL1UFWAbzZBYIOO MhYH2eiLoFrpwe+nNwPEBwqXko0/8yb2pNcpPWDgg/fIqXb1kMNH3ZHXIAZiRIQw80wV 7DTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id e12si1029497qtj.471.2018.02.15.11.01.03; Thu, 15 Feb 2018 11:01:04 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id BAA9460B50; Thu, 15 Feb 2018 19:01:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id F323760845; Thu, 15 Feb 2018 19:00:55 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1AE2A609A2; Thu, 15 Feb 2018 19:00:52 +0000 (UTC) Received: from forward4p.cmail.yandex.net (forward4p.cmail.yandex.net [77.88.31.19]) by lists.linaro.org (Postfix) with ESMTPS id 6074F608BD for ; Thu, 15 Feb 2018 19:00:21 +0000 (UTC) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [37.140.190.29]) by forward4p.cmail.yandex.net (Yandex) with ESMTP id 61B8020E56 for ; Thu, 15 Feb 2018 22:00:19 +0300 (MSK) Received: from smtp4o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4o.mail.yandex.net (Yandex) with ESMTP id 644C86C012F8 for ; Thu, 15 Feb 2018 22:00:12 +0300 (MSK) Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ONGU5LiOyf-0B00Mnbn; Thu, 15 Feb 2018 22:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 15 Feb 2018 22:00:07 +0300 Message-Id: <1518721207-25354-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518721207-25354-1-git-send-email-odpbot@yandex.ru> References: <1518721207-25354-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 485 Subject: [lng-odp] [PATCH v1 1/1] example: generator move to platform tests X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov run generator example with null pktio from linux-generic test directory. Null pktio might not be implemented on other odp implementations. Signed-off-by: Maxim Uvarov --- /** Email created from pull request 485 (muvarov:devel/master_example_null) ** https://github.com/Linaro/odp/pull/485 ** Patch: https://github.com/Linaro/odp/pull/485.patch ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847 ** Merge commit sha: 80a8e790983238f55c99f58abd669c44b0f69a89 **/ example/generator/Makefile.am | 5 --- example/generator/generator_run.sh | 17 -------- platform/linux-generic/m4/configure.m4 | 2 + platform/linux-generic/test/Makefile.am | 4 ++ platform/linux-generic/test/example/Makefile.am | 1 + .../test/example/generator/Makefile.am | 4 ++ .../test/example/generator/generator_run.sh | 45 ++++++++++++++++++++++ 7 files changed, 56 insertions(+), 22 deletions(-) delete mode 100755 example/generator/generator_run.sh create mode 100644 platform/linux-generic/test/example/Makefile.am create mode 100644 platform/linux-generic/test/example/generator/Makefile.am create mode 100755 platform/linux-generic/test/example/generator/generator_run.sh diff --git a/example/generator/Makefile.am b/example/generator/Makefile.am index 63f4ae608..7deeef406 100644 --- a/example/generator/Makefile.am +++ b/example/generator/Makefile.am @@ -3,8 +3,3 @@ include $(top_srcdir)/example/Makefile.inc bin_PROGRAMS = odp_generator odp_generator_SOURCES = odp_generator.c - -if test_example -TESTS = generator_run.sh -endif -EXTRA_DIST = generator_run.sh diff --git a/example/generator/generator_run.sh b/example/generator/generator_run.sh deleted file mode 100755 index 2d741a8d1..000000000 --- a/example/generator/generator_run.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2018, Linaro Limited -# All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause -# - -./odp_generator${EXEEXT} -w 1 -n 1 -I null:0 -m u -STATUS=$? - -if [ "$STATUS" -ne 0 ]; then - echo "Error: status was: $STATUS, expected 0" - exit 1 -fi - -exit 0 diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 7fa3652e2..935894b8c 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -19,6 +19,8 @@ AM_CONDITIONAL([PLATFORM_IS_LINUX_GENERIC], AC_CONFIG_FILES([platform/linux-generic/Makefile platform/linux-generic/libodp-linux.pc platform/linux-generic/test/Makefile + platform/linux-generic/test/example/Makefile + platform/linux-generic/test/example/generator/Makefile platform/linux-generic/test/validation/api/shmem/Makefile platform/linux-generic/test/validation/api/pktio/Makefile platform/linux-generic/test/mmap_vlan_ins/Makefile diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am index 99934099a..e317ff736 100644 --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -3,6 +3,10 @@ TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation SUBDIRS = performance +if test_example +SUBDIRS += example +endif + if test_vald TESTS = validation/api/pktio/pktio_run.sh \ validation/api/pktio/pktio_run_tap.sh \ diff --git a/platform/linux-generic/test/example/Makefile.am b/platform/linux-generic/test/example/Makefile.am new file mode 100644 index 000000000..41d287522 --- /dev/null +++ b/platform/linux-generic/test/example/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = generator diff --git a/platform/linux-generic/test/example/generator/Makefile.am b/platform/linux-generic/test/example/generator/Makefile.am new file mode 100644 index 000000000..3bdfdc69c --- /dev/null +++ b/platform/linux-generic/test/example/generator/Makefile.am @@ -0,0 +1,4 @@ +TESTS_ENVIRONMENT = EXAMPLE_DIR=${top_builddir}/example/generator + +TESTS = generator_run.sh +EXTRA_DIST = generator_run.sh diff --git a/platform/linux-generic/test/example/generator/generator_run.sh b/platform/linux-generic/test/example/generator/generator_run.sh new file mode 100755 index 000000000..3e7fabfe7 --- /dev/null +++ b/platform/linux-generic/test/example/generator/generator_run.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# +# Copyright (c) 2018, Linaro Limited +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +# directory where platform test sources are, including scripts +TEST_SRC_DIR=$(dirname $0) + +# exit codes expected by automake for skipped tests +TEST_SKIPPED=77 + +# directories where binary can be found: +# -in the validation dir when running make check (intree or out of tree) +# -in the script directory, when running after 'make install', or +# -in the validation when running standalone intree. +# -in the current directory. +# running stand alone out of tree requires setting PATH +PATH="${EXAMPLE_DIR}/:$PATH" +PATH="`pwd`/example/generator/:$PATH" +PATH="$(dirname $0)/../../../../../example/generator:$PATH" +PATH=".:$PATH" + +bin_path=$(which odp_generator${EXEEXT}) +if [ -x "$bin_path" ] ; then + echo "running with odp_generator: $bin_path" +else + echo "cannot odp_generator: please set you PATH for it." + pwd + echo $PATH + exit 1 +fi + + +odp_generator${EXEEXT} -w 1 -n 1 -I null:0 -m u +STATUS=$? + +if [ "$STATUS" -ne 0 ]; then + echo "Error: status was: $STATUS, expected 0" + exit 1 +fi + +exit 0