summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin David <valentin.david@codethink.co.uk>2018-12-06 12:58:33 +0100
committerValentin David <valentin.david@codethink.co.uk>2018-12-07 12:23:46 +0100
commit29ff75c1bade5c975f03ec29f516971d910536b6 (patch)
treefe78fd226c1b895302a72db20161ebc3cb6ff116
parent2a0676c3bf607a95a41bd802839eaf677588bf79 (diff)
downloadbuildstream-valentindavid/remove-strip-binaries.tar.gz
Replace strip-binaries by a NOOP scriptvalentindavid/remove-strip-binaries
-rw-r--r--buildstream/data/projectconfig.yaml23
-rw-r--r--tests/cachekey/project/elements/build1.expected2
-rw-r--r--tests/cachekey/project/elements/build2.expected2
-rw-r--r--tests/cachekey/project/target.expected2
-rw-r--r--tests/examples/autotools.py5
-rw-r--r--tests/examples/developing.py5
-rw-r--r--tests/examples/flatpak-autotools.py5
-rw-r--r--tests/integration/autotools.py8
-rw-r--r--tests/integration/cmake.py10
-rw-r--r--tests/integration/compose.py32
10 files changed, 24 insertions, 70 deletions
diff --git a/buildstream/data/projectconfig.yaml b/buildstream/data/projectconfig.yaml
index 4fe95a620..61546b36f 100644
--- a/buildstream/data/projectconfig.yaml
+++ b/buildstream/data/projectconfig.yaml
@@ -54,28 +54,11 @@ variables:
--remove-section=.comment --remove-section=.note --strip-unneeded
- # Generic implementation for stripping debugging symbols
+ # Noop implementation of strip-binaries. Because it is not possible
+ # to have portable script, it is the dutie of projects to define it.
strip-binaries: |
- cd "%{install-root}" && find -type f \
- '(' -perm -111 -o -name '*.so*' \
- -o -name '*.cmxs' -o -name '*.node' ')' \
- -exec sh -ec \
- 'read -n4 hdr <"$1" # check for elf header
- case "$1" in
- %{install-root}%{debugdir}/*)
- exit 0
- ;;
- esac
- if [ "$hdr" != "$(printf \\x7fELF)" ]; then
- exit 0
- fi
- debugfile="%{install-root}%{debugdir}/$1"
- mkdir -p "$(dirname "$debugfile")"
- objcopy %{objcopy-extract-args} "$1" "$debugfile"
- chmod 644 "$debugfile"
- strip %{strip-args} "$1"
- objcopy %{objcopy-link-args} "$debugfile" "$1"' - {} ';'
+ true
# Generic implementation for reproducible python builds
fix-pyc-timestamps: |
diff --git a/tests/cachekey/project/elements/build1.expected b/tests/cachekey/project/elements/build1.expected
index ef18ad98b..012ec18b9 100644
--- a/tests/cachekey/project/elements/build1.expected
+++ b/tests/cachekey/project/elements/build1.expected
@@ -1 +1 @@
-a0d000abc1dea8714cd27f348d0b798b35e7246c44e330c4b3f7912fabacc6db \ No newline at end of file
+883246ee07fd0a742bff5178f3385c61829cb386a90ec8b5699c64f8c4953d7c \ No newline at end of file
diff --git a/tests/cachekey/project/elements/build2.expected b/tests/cachekey/project/elements/build2.expected
index 015085d9e..39e07aa26 100644
--- a/tests/cachekey/project/elements/build2.expected
+++ b/tests/cachekey/project/elements/build2.expected
@@ -1 +1 @@
-79f546a78748d943a6958c99ab4ad03305f96fefd0b424b6b246b0c9816e00c6 \ No newline at end of file
+cc470b6341200c663faece2b526abe9c8ce229e7af25bb94608f09068332313a \ No newline at end of file
diff --git a/tests/cachekey/project/target.expected b/tests/cachekey/project/target.expected
index 00ac2beeb..5945a2c27 100644
--- a/tests/cachekey/project/target.expected
+++ b/tests/cachekey/project/target.expected
@@ -1 +1 @@
-d6d283ed1fb0467fcfa5bf69f8596d0f0ac6638281bc9d8e52e1212e2ec0bcab \ No newline at end of file
+3a4ca16f9250abb0a23277e41f23802116b504b13ccbcdf172cc426fa979a6db \ No newline at end of file
diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py
index 8e4bf5a75..6e59369a4 100644
--- a/tests/examples/autotools.py
+++ b/tests/examples/autotools.py
@@ -29,10 +29,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
result.assert_success()
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
- '/usr/share', '/usr/lib/debug',
- '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello',
- '/usr/bin/hello',
+ '/usr/share', '/usr/bin/hello',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
diff --git a/tests/examples/developing.py b/tests/examples/developing.py
index 0a51802a9..cc87935cb 100644
--- a/tests/examples/developing.py
+++ b/tests/examples/developing.py
@@ -30,10 +30,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
result.assert_success()
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
- '/usr/share', '/usr/lib/debug',
- '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello',
- '/usr/bin/hello'])
+ '/usr/share', '/usr/bin/hello'])
# Test the unmodified hello command works as expected.
diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py
index 73910c5eb..3f0a73eb3 100644
--- a/tests/examples/flatpak-autotools.py
+++ b/tests/examples/flatpak-autotools.py
@@ -48,10 +48,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
- '/usr/share', '/usr/lib/debug',
- '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello',
- '/usr/bin/hello', '/usr/share/doc',
+ '/usr/share', '/usr/bin/hello', '/usr/share/doc',
'/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py
index b80dd6d61..1dc7eeacc 100644
--- a/tests/integration/autotools.py
+++ b/tests/integration/autotools.py
@@ -32,9 +32,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
- '/usr/share', '/usr/lib/debug',
- '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello',
+ '/usr/share',
'/usr/bin/hello', '/usr/share/doc',
'/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
@@ -57,9 +55,7 @@ def test_autotools_confroot_build(cli, tmpdir, datafiles):
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
- '/usr/share', '/usr/lib/debug',
- '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello',
+ '/usr/share',
'/usr/bin/hello', '/usr/share/doc',
'/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
diff --git a/tests/integration/cmake.py b/tests/integration/cmake.py
index d5d1a1695..235dee321 100644
--- a/tests/integration/cmake.py
+++ b/tests/integration/cmake.py
@@ -28,10 +28,7 @@ def test_cmake_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['checkout', element_name, checkout])
assert result.exit_code == 0
- assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello',
- '/usr/lib/debug', '/usr/lib/debug/usr',
- '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello'])
+ assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
@pytest.mark.datafiles(DATA_DIR)
@@ -47,10 +44,7 @@ def test_cmake_confroot_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['checkout', element_name, checkout])
assert result.exit_code == 0
- assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello',
- '/usr/lib/debug', '/usr/lib/debug/usr',
- '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello'])
+ assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
@pytest.mark.datafiles(DATA_DIR)
diff --git a/tests/integration/compose.py b/tests/integration/compose.py
index 885497c48..9cbdc7744 100644
--- a/tests/integration/compose.py
+++ b/tests/integration/compose.py
@@ -38,48 +38,38 @@ def create_compose_element(name, path, config={}):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.parametrize("include_domains,exclude_domains,expected", [
# Test flat inclusion
- ([], [], ['/usr', '/usr/lib', '/usr/bin',
- '/usr/share', '/usr/lib/debug',
- '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello', '/usr/bin/hello',
+ ([], [], ['/usr', '/usr/bin',
+ '/usr/share', '/usr/bin/hello',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README',
'/tests', '/tests/test']),
# Test only runtime
- (['runtime'], [], ['/usr', '/usr/lib', '/usr/share',
+ (['runtime'], [], ['/usr', '/usr/share',
'/usr/bin', '/usr/bin/hello']),
# Test with runtime and doc
- (['runtime', 'doc'], [], ['/usr', '/usr/lib', '/usr/share',
+ (['runtime', 'doc'], [], ['/usr', '/usr/share',
'/usr/bin', '/usr/bin/hello',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README']),
# Test with only runtime excluded
- ([], ['runtime'], ['/usr', '/usr/lib', '/usr/share',
- '/usr/lib/debug', '/usr/lib/debug/usr',
- '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello',
+ ([], ['runtime'], ['/usr', '/usr/share',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README',
'/tests', '/tests/test']),
# Test with runtime and doc excluded
- ([], ['runtime', 'doc'], ['/usr', '/usr/lib', '/usr/share',
- '/usr/lib/debug', '/usr/lib/debug/usr',
- '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello',
+ ([], ['runtime', 'doc'], ['/usr', '/usr/share',
'/tests', '/tests/test']),
# Test with runtime simultaneously in- and excluded
- (['runtime'], ['runtime'], ['/usr', '/usr/lib', '/usr/share']),
+ (['runtime'], ['runtime'], ['/usr', '/usr/share']),
# Test with runtime included and doc excluded
- (['runtime'], ['doc'], ['/usr', '/usr/lib', '/usr/share',
+ (['runtime'], ['doc'], ['/usr', '/usr/share',
'/usr/bin', '/usr/bin/hello']),
# Test including a custom 'test' domain
- (['test'], [], ['/usr', '/usr/lib', '/usr/share',
+ (['test'], [], ['/usr', '/usr/share',
'/tests', '/tests/test']),
# Test excluding a custom 'test' domain
- ([], ['test'], ['/usr', '/usr/lib', '/usr/bin',
- '/usr/share', '/usr/lib/debug',
- '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
- '/usr/lib/debug/usr/bin/hello', '/usr/bin/hello',
+ ([], ['test'], ['/usr', '/usr/bin',
+ '/usr/share', '/usr/bin/hello',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
])