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

Build: specify djpeg rgb-islow-icc-cmp test dependencies #321

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

orivej
Copy link
Contributor

@orivej orivej commented Jan 11, 2019

This test must run after djpeg rgb-islow which generates testout_rgb_islow.icc.


Test failure was observed at https://hydra.nixos.org/build/87096374/nixlog/1 (https://hydra.nixos.org/build/87096374) with the output:

 41/151 Test  #45: djpeg-shared-rgb-islow-icc-cmp ....................***Failed    0.11 sec
Could not obtain MD5 sum: No such file or directory

This test must run after djpeg rgb-islow which generates testout_rgb_islow.icc.
@dcommander
Copy link
Member

We do not observe this failure in any of the official libjpeg-turbo builds, which all run make test, so you’re going to have to help me understand why it’s occurring in your environment, how a normal user could encounter the issue, and why your patch is the best general-purpose solution.

@orivej
Copy link
Contributor Author

orivej commented Jan 13, 2019

We have enabled running ctest tests in parallel by default in NixOS/nixpkgs@70e2b0b (NixOS/nixpkgs#50527). You may reproducible the failure e.g. with ctest -j50.

Normally the add_bittest macro is responsible for making a cmp test be dependent upon running the program: https://github.com/libjpeg-turbo/libjpeg-turbo/blob/2.0.1/CMakeLists.txt#L981-L982:

  macro(add_bittest PROG NAME ARGS OUTFILE INFILE MD5SUM)
    add_test(${PROG}-${libtype}-${NAME}
      ${PROG}${suffix} ${ARGS} -outfile ${OUTFILE} ${INFILE})
    add_test(${PROG}-${libtype}-${NAME}-cmp
      ${MD5CMP} ${MD5SUM} ${OUTFILE})
    set_tests_properties(${PROG}-${libtype}-${NAME}-cmp PROPERTIES
      DEPENDS ${PROG}-${libtype}-${NAME})

It makes djpeg rgb-islow-cmp run after djpeg rgb-islow. djpeg rgb-islow-icc-cmp is a manually added test that should also run after djpeg rgb-islow. My patch applies to it the same set_tests_properties invocation.

@dcommander dcommander merged commit ce90ab5 into libjpeg-turbo:master Jan 21, 2019
@orivej orivej deleted the djpeg-rgb-islow-icc-cmp branch January 21, 2019 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants