-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git object hashing in libutil #9294
Conversation
02a54e0
to
c837e61
Compare
🎉 All dependencies have been resolved ! |
28dcd3f
to
13ff8f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't found an issue, other than that it would be nice to see that the .bin
files correspond to what the real git produces. Perhaps a shell script that produces the same tree using the git
command, and then compares that tree hash to a hash of a .bin
file? (or did I overlook something?)
13ff8f5
to
112fd44
Compare
@roberth I have the additional now yay, but ugh feel weird adding |
In terms of its purpose it's not part of the functional test suite, because it's testing the unit tests, not Nix. |
Oh actually an ad-hoc one-off check:
$(bash) ./script seems to like the right way to solve this problem. Then no changes to the file filters are needed. |
112fd44
to
49cc3df
Compare
49cc3df
to
904ba1f
Compare
init_test () { | ||
cd "$test_dir" && env "${TESTS_ENVIRONMENT[@]}" $BASH -e init.sh 2>/dev/null > /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old init.sh
layer violation
@@ -122,14 +122,15 @@ $(foreach script, $(bin-scripts), $(eval $(call install-program-in,$(script),$(b | |||
$(foreach script, $(bin-scripts), $(eval programs-list += $(script))) | |||
$(foreach script, $(noinst-scripts), $(eval programs-list += $(script))) | |||
$(foreach template, $(template-files), $(eval $(call instantiate-template,$(template)))) | |||
install_test_init=tests/functional/init.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a layer violation, but it is not a new layer violation. mk
previously also new about init.sh
. The violation is in fact "shallower" (closer to the entry point) then before. That seems like an improvement to me.
I like the way having this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after suggestions
This is for writing to a `MemorySourceAccessor`.
The basic idea here is to separate a few intertwined notions: 1. Not all "run bash tests" are "install tests" 2. Not all "run bash tests" use `tests/functional/init.sh`, or any pre-test initialization at all. This will used in the next commit when we have a test that check unit test golden master data. Also, move our custom `PS4` from the test to the test runner, as it is part of how we want to display the tests, not the test themselves. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This is the core functionality but just unit-tested and not yet made part of the store layer. This is because there is some tech debt around (a) repeated boilerplate hashing objects (b) better integration of the new `SourceAccessor` type that needs to be cleaned up first. Part of RFC 133 Co-Authored-By: Matthew Bauer <mjbauer95@gmail.com> Co-Authored-By: Carlo Nucera <carlo.nucera@protonmail.com> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Florian Klink <flokli@flokli.de>
5e9a60d
to
20b95d6
Compare
Motivation
This is the core functionality but just unit-tested and not yet made part of the store layer.
Context
The integration is not yet done because there is some tech debt around (a) repeated boilerplate hashing objects (b) better integration of the new
SourceAccessor
type that needs to be cleaned up first.depends on #9283
Priorities
Add 👍 to pull requests you find important.