gtristan commented on code in PR #1994:
URL: https://github.com/apache/buildstream/pull/1994#discussion_r2003083347
##########
tests/frontend/show.py:
##########
@@ -553,6 +554,64 @@ def test_strict_dependencies(cli, datafiles, target,
expected_state):
assert states[target] == expected_state
+# This tests that cache keys behave as expected when
+# dependencies have been specified as `strict` and
+# when building in strict mode.
+#
+# This test will:
+#
+# * Build the target once (and assert that it is cached)
+# * Modify some local files which are imported
+# by an import element which the target depends on
+# * Assert that the cached state of the target element
+# is as expected
+#
+# We run the test twice, once with an element which strict
+# depends on the changing import element, and one which
+# depends on it regularly.
+#
[email protected](os.path.join(DATA_DIR, "project"))
[email protected](
+ "target, expected_digests",
+ [
+ ("target.bst", {
Review Comment:
Note that, as I am asking for a _separate project directory_ be created for
this test to stand on its own and not mingle data with other tests... I really
think it is sufficient to just have a project with less elements.
I'd be happy enough with one element, but it would be useful to test various
different import elements:
* A regular file with some simple example content e.g. *"The perverted pink
pony mounts the unwilling hippopotamus"*
* A regular file with execute permission
* A symbolic link
The value here might be to check that we indeed get differing content hashes
for individual files with different modes/types, however... while I didn't
think of asking for this, and I'm highly confident that such content hashes are
going to *differ*, it might be interesting to actually know.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]