diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-05-07 20:03:35 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-05-09 17:10:59 -0700 |
commit | 57e8d81d6040f5e67cd76ef40b061a22151a71cf (patch) | |
tree | b35eb0614f09fe41f61e4a41fad370bd356f8b1c /meta-oe | |
parent | 722213211568c20b9f4b09c603cf16ff92b307ce (diff) | |
download | meta-openembedded-57e8d81d6040f5e67cd76ef40b061a22151a71cf.tar.gz |
oprofile: Fix file_manip_tests ptest
Remove assumptions around absolute paths which used __FILE__ macro
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-kernel/oprofile/oprofile/0011-replace-__FILE__-with-__FILE_NAME__.patch | 47 | ||||
-rw-r--r-- | meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile/0011-replace-__FILE__-with-__FILE_NAME__.patch b/meta-oe/recipes-kernel/oprofile/oprofile/0011-replace-__FILE__-with-__FILE_NAME__.patch new file mode 100644 index 000000000..902032969 --- /dev/null +++ b/meta-oe/recipes-kernel/oprofile/oprofile/0011-replace-__FILE__-with-__FILE_NAME__.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 640b116618b89eeddd61a91b793bb3c879adfe57 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 7 May 2024 19:56:59 -0700 | ||
4 | Subject: [PATCH] replace __FILE__ with __FILE_NAME__ | ||
5 | |||
6 | This helps build paths not beeing assumed during runtime | ||
7 | since in cross-builds its possible that absolute paths during | ||
8 | build will not match runtime paths | ||
9 | |||
10 | Upstream-Status: Inappropriate [OE-Specific] | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | libutil++/tests/file_manip_tests.cpp | 10 +++++----- | ||
15 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
16 | |||
17 | diff --git a/libutil++/tests/file_manip_tests.cpp b/libutil++/tests/file_manip_tests.cpp | ||
18 | index dfe161b..3d960bc 100644 | ||
19 | --- a/libutil++/tests/file_manip_tests.cpp | ||
20 | +++ b/libutil++/tests/file_manip_tests.cpp | ||
21 | @@ -138,9 +138,9 @@ static void is_directory_tests() | ||
22 | static input_output<pair<string, string>, bool> | ||
23 | expect_is_files_identical[] = { | ||
24 | #define MAKE_PAIR(a, b) make_pair(string(a), string(b)) | ||
25 | - { MAKE_PAIR(__FILE__, __FILE__), true }, | ||
26 | - { MAKE_PAIR(__FILE__, "not_existing"), false }, | ||
27 | - { MAKE_PAIR("not_exisiting", __FILE__), false }, | ||
28 | + { MAKE_PAIR(__FILE_NAME__, __FILE_NAME__), true }, | ||
29 | + { MAKE_PAIR(__FILE_NAME__, "not_existing"), false }, | ||
30 | + { MAKE_PAIR("not_exisiting", __FILE_NAME__), false }, | ||
31 | { MAKE_PAIR("not_exisiting", "not_existing"), false }, | ||
32 | { MAKE_PAIR("", ""), false } | ||
33 | #undef MAKE_PAIR | ||
34 | @@ -163,8 +163,8 @@ void is_files_identical_tests(char const * prog_name) | ||
35 | |||
36 | static input_output<char const *, bool> expect_op_file_readable[] = | ||
37 | { | ||
38 | - { __FILE__, true }, | ||
39 | - { "./" __FILE__, true }, | ||
40 | + { __FILE_NAME__, true }, | ||
41 | + { "./" __FILE_NAME__, true }, | ||
42 | { ".", false }, | ||
43 | { "/.", false }, | ||
44 | { "./", false }, | ||
45 | -- | ||
46 | 2.45.0 | ||
47 | |||
diff --git a/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb b/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb index 092d22746..c4c89e575 100644 --- a/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb +++ b/meta-oe/recipes-kernel/oprofile/oprofile_1.4.0.bb | |||
@@ -30,6 +30,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | |||
30 | file://0008-include-linux-limits.h-for-MAX_INPUT.patch \ | 30 | file://0008-include-linux-limits.h-for-MAX_INPUT.patch \ |
31 | file://0009-Prevent-running-check-tests-on-host-if-cross-compili.patch \ | 31 | file://0009-Prevent-running-check-tests-on-host-if-cross-compili.patch \ |
32 | file://0010-oprofile-Determine-the-root-home-directory-dynamical.patch \ | 32 | file://0010-oprofile-Determine-the-root-home-directory-dynamical.patch \ |
33 | file://0011-replace-__FILE__-with-__FILE_NAME__.patch \ | ||
33 | file://0001-configure-Include-unistd.h-for-getpid-API.patch \ | 34 | file://0001-configure-Include-unistd.h-for-getpid-API.patch \ |
34 | file://0001-Replace-std-bind2nd-with-generic-lambda.patch \ | 35 | file://0001-Replace-std-bind2nd-with-generic-lambda.patch \ |
35 | " | 36 | " |