-
Notifications
You must be signed in to change notification settings - Fork 358
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
reftest: add test for variables resolutions in filter, for all fields #5643
base: master
Are you sure you want to change the base?
Conversation
2e16743
to
0f61464
Compare
c191f42
to
d53f6f9
Compare
d53f6f9
to
25837cf
Compare
25837cf
to
930e28e
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.
I haven't gone through the test properly, but unlike #5642, I think this one is a good candidate for a reftest. I half wondered with the tests which produce messages if it would be worth piping the whole thing through an appropriate grep just to keep the output smaller?
src/core/opamSystem.ml
Outdated
match OpamProcess.run | ||
(make_command ~verbose:OpamCoreConfig.(!r.verbose_level >= 3) | ||
~name:"patch" patch_cmd ["--version"]) with |
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.
It doesn't feel like a good to stop having -vv
display all commands run... is there anywhere else we already do 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.
I don't think this change should be part of this PR
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.
I've removed that part from the PR. Feel free to revert to the previous commit if you prefer to have the previous version
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.
After checking, not really, the other instances are for verbose level >= 2. The only instance where it is >=3 is for commands run by depext, to avoid the big log.
97f6c16
to
d2b04b6
Compare
d2b04b6
to
a9c2b0a
Compare
### <pkg:patches.1:some-content> | ||
blabla | ||
pioupiou | ||
bloblob | ||
### <pkg:patches.1:to-apply.patch> | ||
--- a/some-content 2020-12-02 14:22:55.364620832 +0100 | ||
++ b/some-content 2020-12-02 14:23:05.668686881 +0100 | ||
@@ -1,3 +1,3 @@ | ||
blabla | ||
-pioupiou | ||
+ploplop | ||
bloblob | ||
### <pkg:patches.1:to-not-apply.patch> | ||
--- a/some-content 2020-12-02 14:22:55.364620832 +0100 | ||
++ b/some-content 2020-12-02 14:23:05.668686881 +0100 | ||
@@ -2,3 +2,3 @@ | ||
ploplop | ||
-bloblob | ||
+noooooo | ||
### <pkg:patches.1> | ||
opam-version: "2.0" | ||
patches: [ | ||
"to-apply.patch" { ?smtg } | ||
"to-not-apply.patch" { !?smtg } | ||
] | ||
build: [ | ||
[ "grep" "ploplop" "some-content" ] | ||
[ "grep" "bloblob" "some-content" ] | ||
] |
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 section is already defined in line 18 of the same file
### <pkg:build.1> | ||
opam-version: "2.0" | ||
build: [ | ||
[ "true" { ?smtg } ] | ||
[ "false" { !?smtg } ] | ||
] |
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.
already defined above
### <pkg:install.1> | ||
opam-version: "2.0" | ||
install: [ | ||
[ "true" { ?smtg } ] | ||
[ "false" { !?smtg } ] | ||
] |
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.
same
### <pkg:runtest.1> | ||
opam-version: "2.0" | ||
run-test: [ | ||
[ "true" { ?smtg } ] | ||
[ "false" { !?smtg } ] | ||
] |
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.
same
### <pkg:post-msg.1> | ||
opam-version: "2.0" | ||
post-messages: [ | ||
"Bye!" { ?smtg } | ||
">>smtg is undefined<<" { !?smtg } | ||
] |
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.
same
### <pkg:avail.1> | ||
opam-version: "2.0" | ||
available: [ ?smtg ] |
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.
same
### <pkg:patches.1:some-content> | ||
blabla | ||
pioupiou | ||
bloblob | ||
### <pkg:patches.1:to-apply.patch> | ||
--- a/some-content 2020-12-02 14:22:55.364620832 +0100 | ||
++ b/some-content 2020-12-02 14:23:05.668686881 +0100 | ||
@@ -1,3 +1,3 @@ | ||
blabla | ||
-pioupiou | ||
+ploplop | ||
bloblob | ||
### <pkg:patches.1:to-not-apply.patch> | ||
--- a/some-content 2020-12-02 14:22:55.364620832 +0100 | ||
++ b/some-content 2020-12-02 14:23:05.668686881 +0100 | ||
@@ -2,3 +2,3 @@ | ||
ploplop | ||
-bloblob | ||
+noooooo |
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.
these files don't have to be redefined
### <pkg:patches.1:some-content> | ||
blabla | ||
pioupiou | ||
bloblob | ||
### <pkg:patches.1:to-apply.patch> | ||
--- a/some-content 2020-12-02 14:22:55.364620832 +0100 | ||
++ b/some-content 2020-12-02 14:23:05.668686881 +0100 | ||
@@ -1,3 +1,3 @@ | ||
blabla | ||
-pioupiou | ||
+ploplop | ||
bloblob | ||
### <pkg:patches.1:to-not-apply.patch> | ||
--- a/some-content 2020-12-02 14:22:55.364620832 +0100 | ||
++ b/some-content 2020-12-02 14:23:05.668686881 +0100 | ||
@@ -2,3 +2,3 @@ | ||
ploplop | ||
-bloblob | ||
+noooooo |
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.
these files don't have to be redefined
### ::::::::::::::::::::::::::: | ||
### :: Self package variable :: | ||
### ::::::::::::::::::::::::::: |
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.
for this section i think it would be also be useful to show the behaviour of opam when the package has already been installed. Like, for each fields, show the behaviour as is done currently, then force-install the package and try to install it again and show if there is a difference of behaviour
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.
updated with these tests in a separate commit
a9c2b0a
to
4972b20
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.
On file definition redundancy, the main idea is to have all information about the given test in its section. But there is 2 different cases:
- patches that never changes, are always redefined, and their content it not so much important to understand the given test
- opam files that are the same for a subset of the tests, they are more important to understand why it fails or not (how is used the variable).
I think that patches can be grouped at the beginning of the test, but opam files add more readability if they are duplicated in their own section.
### ::::::::::::::::::::::::::: | ||
### :: Self package variable :: | ||
### ::::::::::::::::::::::::::: |
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.
updated with these tests in a separate commit
No description provided.