This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch tristan/artifact-show-remote in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit aba8d15047c798d51e2caf0b588e1f0efadc04b6 Author: Tristan van Berkom <[email protected]> AuthorDate: Sun Nov 9 13:27:08 2025 +0900 tests/frontend/artifact_show.py: Split out test files from common data dir This just follows the new, improved policy to not share data files across test cases, leading to the huge crazy shared mess that is found in tests/frontend/project, where any change here for a given test risks affecting many adjacent tests. --- tests/frontend/artifact-show/elements/compose-all.bst | 12 ++++++++++++ tests/frontend/artifact-show/elements/import-bin.bst | 4 ++++ tests/frontend/artifact-show/elements/import-dev.bst | 4 ++++ tests/frontend/artifact-show/elements/manual.bst | 9 +++++++++ tests/frontend/artifact-show/elements/target.bst | 8 ++++++++ tests/frontend/artifact-show/files/bin-files/usr/bin/hello | 3 +++ .../artifact-show/files/dev-files/usr/include/pony.h | 12 ++++++++++++ tests/frontend/artifact-show/project.conf | 10 ++++++++++ tests/frontend/artifact_show.py | 2 +- 9 files changed, 63 insertions(+), 1 deletion(-) diff --git a/tests/frontend/artifact-show/elements/compose-all.bst b/tests/frontend/artifact-show/elements/compose-all.bst new file mode 100644 index 000000000..ba47081b3 --- /dev/null +++ b/tests/frontend/artifact-show/elements/compose-all.bst @@ -0,0 +1,12 @@ +kind: compose + +depends: +- filename: import-bin.bst + type: build +- filename: import-dev.bst + type: build + +config: + # Dont try running the sandbox, we dont have a + # runtime to run anything in this context. + integrate: False diff --git a/tests/frontend/artifact-show/elements/import-bin.bst b/tests/frontend/artifact-show/elements/import-bin.bst new file mode 100644 index 000000000..a847c0c23 --- /dev/null +++ b/tests/frontend/artifact-show/elements/import-bin.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: files/bin-files diff --git a/tests/frontend/artifact-show/elements/import-dev.bst b/tests/frontend/artifact-show/elements/import-dev.bst new file mode 100644 index 000000000..152a54667 --- /dev/null +++ b/tests/frontend/artifact-show/elements/import-dev.bst @@ -0,0 +1,4 @@ +kind: import +sources: +- kind: local + path: files/dev-files diff --git a/tests/frontend/artifact-show/elements/manual.bst b/tests/frontend/artifact-show/elements/manual.bst new file mode 100644 index 000000000..142409a08 --- /dev/null +++ b/tests/frontend/artifact-show/elements/manual.bst @@ -0,0 +1,9 @@ +kind: manual + +config: + build-commands: + - echo "hello" + +sources: + - kind: local + path: elements/manual.bst diff --git a/tests/frontend/artifact-show/elements/target.bst b/tests/frontend/artifact-show/elements/target.bst new file mode 100644 index 000000000..b9432fafa --- /dev/null +++ b/tests/frontend/artifact-show/elements/target.bst @@ -0,0 +1,8 @@ +kind: stack +description: | + + Main stack target for the bst build test + +depends: +- import-bin.bst +- compose-all.bst diff --git a/tests/frontend/artifact-show/files/bin-files/usr/bin/hello b/tests/frontend/artifact-show/files/bin-files/usr/bin/hello new file mode 100755 index 000000000..f534a4083 --- /dev/null +++ b/tests/frontend/artifact-show/files/bin-files/usr/bin/hello @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "Hello !" diff --git a/tests/frontend/artifact-show/files/dev-files/usr/include/pony.h b/tests/frontend/artifact-show/files/dev-files/usr/include/pony.h new file mode 100644 index 000000000..40bd0c2e7 --- /dev/null +++ b/tests/frontend/artifact-show/files/dev-files/usr/include/pony.h @@ -0,0 +1,12 @@ +#ifndef __PONY_H__ +#define __PONY_H__ + +#define PONY_BEGIN "Once upon a time, there was a pony." +#define PONY_END "And they lived happily ever after, the end." + +#define MAKE_PONY(story) \ + PONY_BEGIN \ + story \ + PONY_END + +#endif /* __PONY_H__ */ diff --git a/tests/frontend/artifact-show/project.conf b/tests/frontend/artifact-show/project.conf new file mode 100644 index 000000000..7e690f56f --- /dev/null +++ b/tests/frontend/artifact-show/project.conf @@ -0,0 +1,10 @@ +# Project config for frontend build test +name: test +min-version: 2.0 +element-path: elements + +plugins: +- origin: pip + package-name: sample-plugins + sources: + - git diff --git a/tests/frontend/artifact_show.py b/tests/frontend/artifact_show.py index 32e6542c1..2b8e405c6 100644 --- a/tests/frontend/artifact_show.py +++ b/tests/frontend/artifact_show.py @@ -26,7 +26,7 @@ from tests.testutils import create_artifact_share # Project directory DATA_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)), - "project", + "artifact-show", ) SIMPLE_DIR = os.path.join( os.path.dirname(os.path.realpath(__file__)),
