summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2022-08-24 17:06:56 +0800
committerKhem Raj <raj.khem@gmail.com>2022-08-24 08:26:55 -0700
commit8e6b9583d67ffa480e23ee61709e32dbbe17af41 (patch)
treedcdd79e3a5f984a1d92e8c2646b7e2849065f6c2 /meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch
parenta9bb79e1b9bef281e4d83eb575426c60b5abc5e1 (diff)
downloadmeta-openembedded-8e6b9583d67ffa480e23ee61709e32dbbe17af41.tar.gz
freediameter: fix buildpaths issue
The pass-ptest-env.patch uses ${B}/extensions as the EXTENSIONS_DIR at build time and pass the env variable EXTENSIONS_DIR as ${libdir}/${fd_pkgname} at run time to fix the run time error. But there still exists buildpaths issue. So rework the pass-ptest-env.patch to make sure EXTENSIONS_DIR to be ${libdir}/${fd_pkgname} both in build and run time. Fixes: WARNING: freediameter-1.4.0-r0 do_package_qa: QA Issue: File /usr/lib/freeDiameter/ptest/testloadext in package freediameter-ptest contains reference to TMPDIR File /usr/lib/freeDiameter/ptest/testmesg_stress in package freediameter-ptest contains reference to TMPDIR File /usr/lib/freeDiameter/ptest/CTestTestfile.cmake in package freediameter-ptest contains reference to TMPDIR [buildpaths] WARNING: freediameter-1.4.0-r0 do_package_qa: QA Issue: File /usr/src/debug/freediameter/1.4.0-r0/build/libfdcore/fdd.tab.c in package freediameter-src contains reference to TMPDIR Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch')
-rw-r--r--meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch b/meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch
new file mode 100644
index 0000000000..4cedc21ce8
--- /dev/null
+++ b/meta-networking/recipes-protocols/freediameter/files/0001-tests-use-EXTENSIONS_DIR.patch
@@ -0,0 +1,92 @@
1From 935fcac46e2790e0e297ca855b8033895c1b8941 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Wed, 24 Aug 2022 13:45:32 +0800
4Subject: [PATCH] tests: use EXTENSIONS_DIR
5
6Use EXTENSIONS_DIR to replace BUILD_DIR as the BUILD_DIR is meanlingless
7on target and also fix buildpaths issue.
8
9Upstream-Status: Inappropriate [OE ptest specific]
10
11Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
12---
13 tests/CMakeLists.txt | 1 +
14 tests/testloadext.c | 12 ++++++------
15 tests/testmesg_stress.c | 12 ++++++------
16 3 files changed, 13 insertions(+), 12 deletions(-)
17
18diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
19index 8b698ce..2c83cbb 100644
20--- a/tests/CMakeLists.txt
21+++ b/tests/CMakeLists.txt
22@@ -37,6 +37,7 @@ SET(TEST_LIST
23
24 ADD_DEFINITIONS(-DTEST_DEBUG)
25 ADD_DEFINITIONS(-DBUILD_DIR="${CMAKE_BINARY_DIR}")
26+ADD_DEFINITIONS(-DEXTENSIONS_DIR="${EXTENSIONS_DIR}")
27
28 INCLUDE_DIRECTORIES( "../libfdproto" )
29 INCLUDE_DIRECTORIES( "../libfdcore" )
30diff --git a/tests/testloadext.c b/tests/testloadext.c
31index 452737f..3fffef5 100644
32--- a/tests/testloadext.c
33+++ b/tests/testloadext.c
34@@ -35,9 +35,9 @@
35
36 #include "tests.h"
37
38-#ifndef BUILD_DIR
39-#error "Missing BUILD_DIR information"
40-#endif /* BUILD_DIR */
41+#ifndef EXTENSIONS_DIR
42+#error "Missing EXTENSIONS_DIR information"
43+#endif /* EXTENSIONS_DIR */
44
45 #include <sys/types.h>
46 #include <dirent.h>
47@@ -59,9 +59,9 @@ int main(int argc, char *argv[])
48 CHECK( 0, fd_rtdisp_init() );
49
50 /* Find all extensions which have been compiled along the test */
51- TRACE_DEBUG(INFO, "Loading from: '%s'", BUILD_DIR "/extensions");
52- CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 );
53- pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
54+ TRACE_DEBUG(INFO, "Loading from: '%s'", EXTENSIONS_DIR);
55+ CHECK( 0, (dir = opendir (EXTENSIONS_DIR)) == NULL ? 1 : 0 );
56+ pathlen = snprintf(fullname, sizeof(fullname), EXTENSIONS_DIR "/");
57
58 while ((dp = readdir (dir)) != NULL) {
59 char * dot = strrchr(dp->d_name, '.');
60diff --git a/tests/testmesg_stress.c b/tests/testmesg_stress.c
61index 310a9d2..97dfe07 100644
62--- a/tests/testmesg_stress.c
63+++ b/tests/testmesg_stress.c
64@@ -38,9 +38,9 @@
65 #include <libgen.h>
66 #include <dlfcn.h>
67
68-#ifndef BUILD_DIR
69-#error "Missing BUILD_DIR information"
70-#endif /* BUILD_DIR */
71+#ifndef EXTENSIONS_DIR
72+#error "Missing EXTENSIONS_DIR information"
73+#endif /* EXTENSIONS_DIR */
74
75
76 /* The number of times each operation is repeated to measure the average operation time */
77@@ -73,9 +73,9 @@ static void load_all_extensions(char * prefix)
78 struct fd_list ext_with_depends = FD_LIST_INITIALIZER(ext_with_depends);
79
80 /* Find all extensions which have been compiled along the test */
81- LOG_D("Loading %s*.fdx from: '%s'", BUILD_DIR "/extensions", prefix ?: "");
82- CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 );
83- pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/");
84+ LOG_D("Loading %s*.fdx from: '%s'", EXTENSIONS_DIR, prefix ?: "");
85+ CHECK( 0, (dir = opendir (EXTENSIONS_DIR)) == NULL ? 1 : 0 );
86+ pathlen = snprintf(fullname, sizeof(fullname), EXTENSIONS_DIR "/");
87
88 while ((dp = readdir (dir)) != NULL) {
89 char * dot = strrchr(dp->d_name, '.');
90--
912.25.1
92