Skip to content
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

test: remove pkg-config output for reproducibility #6543

Merged
merged 2 commits into from
Nov 24, 2022

Conversation

emillon
Copy link
Collaborator

@emillon emillon commented Nov 22, 2022

The last line changes depending on the pkg-config version. In 1.8.0 it says "Package 'fooBar', required by 'virtual:world', not found", breaking the test.

Closes #6512

The last line changes depending on the pkg-config version. In 1.8.0 it
says "Package 'fooBar', required by 'virtual:world', not found",
breaking the test.

Closes ocaml#6512

Signed-off-by: Etienne Millon <me@emillon.org>
@@ -14,7 +14,7 @@
> (functor Type_description))))
> EOF

$ dune build
$ bash -c 'set -o pipefail; dune build 2>&1 | head -n 20'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to run this inside bash?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just running dune build 2>&1 | head -n 20 always succeeds, so we lose the [1] part (we're not testing the exit code of the command anymore). set -o pipefail handles that correctly by propagating the exit code in an eager way, but requires bash. Maybe it's possible to do that in a more portable way like output=$(dune build 2>&1); r=$?; echo $output; return $r but we already depend on bash so it sounds better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do depend on bash but that's a bit unfortunate

@emillon emillon merged commit 0a77fb9 into ocaml:main Nov 24, 2022
@emillon emillon deleted the fix-6512 branch November 24, 2022 10:11
jchavarri added a commit to jchavarri/dune that referenced this pull request Nov 24, 2022
* main: (58 commits)
  test: formatting of alternative dune files (ocaml#6567)
  refactor: remove Modules.is_empty (ocaml#6564)
  refactor: module kinds (ocaml#6562)
  refactor(coq): resolve lack of coqc properly
  Cache file contents in action builder by name. (ocaml#6555)
  fix: re-enable dune on older macos sdk's (ocaml#6515)
  fix: do not hide lib interface module (ocaml#6549)
  test: remove pkg-config output for reproducibility (ocaml#6543)
  melange: add test for ocaml flags (ocaml#6548)
  fix: improve virtual library error messages
  test: virtual library and impl locations
  test: alias module regression (ocaml#6544)
  refactor(merlin): dump config sub command (ocaml#6547)
  refactor: simplify merlin (ocaml#6508)
  chore(nix): use nix-overlays for the slim devShell (ocaml#6546)
  fix: module compilation rule env (ocaml#6527)
  chore: update nix (ocaml#6536)
  fix: merlin rules with pp's (ocaml#6474)
  Call [Dune_util.Log.init] as soon as possible (ocaml#6542)
  refactor: speed up stdlib build (ocaml#6524)
  ...
jchavarri added a commit to jchavarri/dune that referenced this pull request Nov 24, 2022
* main:
  test: formatting of alternative dune files (ocaml#6567)
  refactor: remove Modules.is_empty (ocaml#6564)
  refactor: module kinds (ocaml#6562)
  refactor(coq): resolve lack of coqc properly
  Cache file contents in action builder by name. (ocaml#6555)
  fix: re-enable dune on older macos sdk's (ocaml#6515)
  fix: do not hide lib interface module (ocaml#6549)
  test: remove pkg-config output for reproducibility (ocaml#6543)
  melange: add test for ocaml flags (ocaml#6548)
  fix: improve virtual library error messages
  test: virtual library and impl locations
  test: alias module regression (ocaml#6544)
  refactor(merlin): dump config sub command (ocaml#6547)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests: pkg-config output changed and breaks github-5561-name-mangle.t
2 participants