diff mbox series

[babeltrace] Port: do not depend on GNU readlink

Message ID 1505852790-23336-1-git-send-email-mjeanson@efficios.com
State Accepted, archived
Headers show
Series [babeltrace] Port: do not depend on GNU readlink | expand

Commit Message

Michael Jeanson Sept. 19, 2017, 8:26 p.m. UTC
Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 tests/lib/test_ctf_writer_complete.in      | 3 +--
 tests/lib/test_plugin_complete.in          | 3 +--
 tests/plugins/test-utils-muxer-complete.in | 3 +--
 tests/plugins/test_bin_info_complete.in    | 3 +--
 tests/plugins/test_dwarf_complete.in       | 3 +--
 5 files changed, 5 insertions(+), 10 deletions(-)

Comments

Jérémie Galarneau Oct. 4, 2017, 6:42 p.m. UTC | #1
Merged in master and stable-2.0.

Thanks!
Jérémie

On 19 September 2017 at 16:26, Michael Jeanson <mjeanson at efficios.com> wrote:
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
>  tests/lib/test_ctf_writer_complete.in      | 3 +--
>  tests/lib/test_plugin_complete.in          | 3 +--
>  tests/plugins/test-utils-muxer-complete.in | 3 +--
>  tests/plugins/test_bin_info_complete.in    | 3 +--
>  tests/plugins/test_dwarf_complete.in       | 3 +--
>  5 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/tests/lib/test_ctf_writer_complete.in b/tests/lib/test_ctf_writer_complete.in
> index 4502d44..abb0575 100644
> --- a/tests/lib/test_ctf_writer_complete.in
> +++ b/tests/lib/test_ctf_writer_complete.in
> @@ -20,7 +20,6 @@
>  NO_SH_TAP=1
>  . "@abs_top_builddir@/tests/utils/common.sh"
>
> -script="$(readlink -f "$0")"
> -curdir="$(dirname "$script")"
> +curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
>
>  "${curdir}/test_ctf_writer" "$BT_BIN"
> diff --git a/tests/lib/test_plugin_complete.in b/tests/lib/test_plugin_complete.in
> index 24bea07..4bcf2bf 100644
> --- a/tests/lib/test_plugin_complete.in
> +++ b/tests/lib/test_plugin_complete.in
> @@ -20,8 +20,7 @@
>  NO_SH_TAP=1
>  . "@abs_top_builddir@/tests/utils/common.sh"
>
> -script="$(readlink -f "$0")"
> -curdir="$(dirname "$script")"
> +curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
>
>  plugin_dir="${curdir}/test-plugin-plugins/.libs"
>
> diff --git a/tests/plugins/test-utils-muxer-complete.in b/tests/plugins/test-utils-muxer-complete.in
> index 85b51dd..beb6f0a 100644
> --- a/tests/plugins/test-utils-muxer-complete.in
> +++ b/tests/plugins/test-utils-muxer-complete.in
> @@ -20,8 +20,7 @@
>  NO_SH_TAP=1
>  . "@abs_top_builddir@/tests/utils/common.sh"
>
> -script="$(readlink -f "$0")"
> -curdir="$(dirname "$script")"
> +curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
>
>  plugin_dir="${BT_BUILD_PATH}/plugins/utils"
>
> diff --git a/tests/plugins/test_bin_info_complete.in b/tests/plugins/test_bin_info_complete.in
> index 09ab708..0069dd7 100644
> --- a/tests/plugins/test_bin_info_complete.in
> +++ b/tests/plugins/test_bin_info_complete.in
> @@ -20,8 +20,7 @@
>  NO_SH_TAP=1
>  . "@abs_top_builddir@/tests/utils/common.sh"
>
> -script="$(readlink -f "$0")"
> -curdir="$(dirname "$script")"
> +curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
>
>  debug_info_data="${BT_SRC_PATH}/tests/debug-info-data"
>
> diff --git a/tests/plugins/test_dwarf_complete.in b/tests/plugins/test_dwarf_complete.in
> index a0ae51b..0a99e7d 100644
> --- a/tests/plugins/test_dwarf_complete.in
> +++ b/tests/plugins/test_dwarf_complete.in
> @@ -20,8 +20,7 @@
>  NO_SH_TAP=1
>  . "@abs_top_builddir@/tests/utils/common.sh"
>
> -script="$(readlink -f "$0")"
> -curdir="$(dirname "$script")"
> +curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
>
>  debug_info_data="${BT_SRC_PATH}/tests/debug-info-data"
>
> --
> 2.7.4
>
diff mbox series

Patch

diff --git a/tests/lib/test_ctf_writer_complete.in b/tests/lib/test_ctf_writer_complete.in
index 4502d44..abb0575 100644
--- a/tests/lib/test_ctf_writer_complete.in
+++ b/tests/lib/test_ctf_writer_complete.in
@@ -20,7 +20,6 @@ 
 NO_SH_TAP=1
 . "@abs_top_builddir@/tests/utils/common.sh"
 
-script="$(readlink -f "$0")"
-curdir="$(dirname "$script")"
+curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
 "${curdir}/test_ctf_writer" "$BT_BIN"
diff --git a/tests/lib/test_plugin_complete.in b/tests/lib/test_plugin_complete.in
index 24bea07..4bcf2bf 100644
--- a/tests/lib/test_plugin_complete.in
+++ b/tests/lib/test_plugin_complete.in
@@ -20,8 +20,7 @@ 
 NO_SH_TAP=1
 . "@abs_top_builddir@/tests/utils/common.sh"
 
-script="$(readlink -f "$0")"
-curdir="$(dirname "$script")"
+curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
 plugin_dir="${curdir}/test-plugin-plugins/.libs"
 
diff --git a/tests/plugins/test-utils-muxer-complete.in b/tests/plugins/test-utils-muxer-complete.in
index 85b51dd..beb6f0a 100644
--- a/tests/plugins/test-utils-muxer-complete.in
+++ b/tests/plugins/test-utils-muxer-complete.in
@@ -20,8 +20,7 @@ 
 NO_SH_TAP=1
 . "@abs_top_builddir@/tests/utils/common.sh"
 
-script="$(readlink -f "$0")"
-curdir="$(dirname "$script")"
+curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
 plugin_dir="${BT_BUILD_PATH}/plugins/utils"
 
diff --git a/tests/plugins/test_bin_info_complete.in b/tests/plugins/test_bin_info_complete.in
index 09ab708..0069dd7 100644
--- a/tests/plugins/test_bin_info_complete.in
+++ b/tests/plugins/test_bin_info_complete.in
@@ -20,8 +20,7 @@ 
 NO_SH_TAP=1
 . "@abs_top_builddir@/tests/utils/common.sh"
 
-script="$(readlink -f "$0")"
-curdir="$(dirname "$script")"
+curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
 debug_info_data="${BT_SRC_PATH}/tests/debug-info-data"
 
diff --git a/tests/plugins/test_dwarf_complete.in b/tests/plugins/test_dwarf_complete.in
index a0ae51b..0a99e7d 100644
--- a/tests/plugins/test_dwarf_complete.in
+++ b/tests/plugins/test_dwarf_complete.in
@@ -20,8 +20,7 @@ 
 NO_SH_TAP=1
 . "@abs_top_builddir@/tests/utils/common.sh"
 
-script="$(readlink -f "$0")"
-curdir="$(dirname "$script")"
+curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
 debug_info_data="${BT_SRC_PATH}/tests/debug-info-data"