Use pkg-config rather than SDK in autotests 73/15873/2
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 12 Oct 2018 10:32:46 +0000 (11:32 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 13 Nov 2018 11:18:30 +0000 (11:18 +0000)
Change-Id: I573da457a21662a02e1f11a45a759f44ed36dc43
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
debian/control
debian/dpdk.install
debian/tests/control
debian/tests/test-autotest
debian/tests/test-linkage

index 0626d8b..9030070 100644 (file)
@@ -49,6 +49,8 @@ Suggests: dpdk-doc,
           dpdk-igb-uio-dkms (= ${binary:Version}),
           dpdk-rte-kni-dkms (= ${binary:Version}),
           linux-image-generic,
+Breaks: dpdk-dev (<< 18.11)
+Replaces: dpdk-dev (<< 18.11)
 Description: Data Plane Development Kit (runtime)
  DPDK is a set of libraries for fast packet processing. Applications run
  in user-space and communicate directly with dedicated network interfaces.
index 4f24317..74dd0b8 100644 (file)
@@ -2,3 +2,8 @@ debian/interfaces       etc/dpdk/
 debian/dpdk-init       lib/dpdk/
 debian/dpdk.conf       etc/dpdk/
 usr/bin
+obj-*/test/test/dpdk-test usr/bin/
+test/test/autotest.py usr/share/dpdk/test/
+test/test/autotest_data.py usr/share/dpdk/test/
+test/test/autotest_runner.py usr/share/dpdk/test/
+test/test/autotest_test_funcs.py usr/share/dpdk/test/
index 797a34f..3b85c00 100644 (file)
@@ -1,12 +1,11 @@
 Tests: test-initscripts
 Restrictions: allow-stderr, isolation-machine, needs-root
-Depends: dpdk [amd64 arm64 i386 ppc64el], gawk, mount, systemd, sysvinit-utils
+Depends: dpdk [amd64 arm64 i386 ppc64el], gawk, mount, systemd, sysvinit-utils, iproute2
 
 Tests: test-linkage
 Restrictions: allow-stderr
 Depends: libdpdk-dev [amd64 arm64 i386 ppc64el], libc6, libc6-dev, gcc,
- grep, libpcap-dev, libxenstore3.0 [amd64 arm64 i386], pax-utils, pkg-config,
- dpdk-dev [amd64 arm64 i386 ppc64el]
+ grep, libpcap-dev, libxenstore3.0 [amd64 arm64 i386], pax-utils, pkg-config
 
 Tests: test-dkms
 Restrictions: allow-stderr, isolation-machine, needs-root
@@ -15,4 +14,4 @@ Depends: kmod, dpdk-igb-uio-dkms [amd64 arm64 i386 ppc64el],
 
 Tests: test-autotest
 Restrictions: allow-stderr, isolation-machine, needs-root
-Depends: dpdk-dev [amd64 arm64 i386 ppc64el], python, python-pexpect
+Depends: dpdk [amd64 arm64 i386 ppc64el], python, python-pexpect
index 0ab308f..e5bee2c 100644 (file)
@@ -31,9 +31,6 @@ if [[ "$realhp" != "512" ]]; then
     exit 0
 fi
 
-# fetch build config
-. /usr/share/dpdk/dpdk-sdk-env.sh
-
 # Reasons for not being an dh_autotest
 # - needs root and hugepages
 # - build environment capabilities too unpredictable
@@ -50,9 +47,8 @@ fi
 # - pci doesn't initialize in all virt env causing command not found issues
 # - rather slow performance tests not suited for regular build associated tests: ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf
 
-python "${RTE_SDK}/test/autotest.py" \
-    "${RTE_SDK}/test/test" \
-    "${RTE_TARGET}" \
+python "/usr/share/dpdk/test/autotest.py" \
+    "/usr/bin/dpdk-test" \
     "-KNI,power_acpi_cpufreq,power_kvm_vm,IVSHMEM,eal_flags,pci,ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf" \
 
 # Pass/Fail
index a49eedd..f47da74 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 set -eux
-binary="build/testlinkage"
+binary="testlinkage"
 
 basedir=$(dirname "$0")
 . "${basedir}"/check-dpdk-supported-arch.sh
@@ -16,39 +16,10 @@ int main(void)
 }
 EOF
 
-cat >  Makefile-testlinkage << 'EOF'
-# Based on examples/helloworld/Makefile
-
-ifeq ($(RTE_SDK),)
-$(error "Please define RTE_SDK environment variable")
-endif
-
-# Default target, can be overridden by command line or environment
-RTE_TARGET ?= x86_64-native-linuxapp-gcc
-
-include $(RTE_SDK)/mk/rte.vars.mk
-
-# binary name
-APP = testlinkage
-
-# all source are stored in SRCS-y
-SRCS-y := testlinkage.c
-
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS)
-
-include $(RTE_SDK)/mk/rte.extapp.mk
-EOF
-
-
-printf "\n\nSet up DPDK'ish build environment\n"
-. /usr/share/dpdk/dpdk-sdk-env.sh
-export CFLAGS=$(pkg-config --libs --cflags libdpdk)
-
 # -ldpdk actually refers to a linker script now, not a real .so
 # with broken linkage this will fail with undefined symbols
 printf "\n\nChecking compile with link against DPDK\n"
-make V=1 -f Makefile-testlinkage
+gcc testlinkage.c $(pkg-config --libs --cflags libdpdk) -o testlinkage
 echo "OK"
 
 printf "\n\nLinkage info\n"