Conan-center-index: [service] Run test_package using a different conan home

Created on 3 Feb 2020  路  2Comments  路  Source: conan-io/conan-center-index

The development of the recipes for autoconf/automake/libtool showed a hole in the CI process:
the CI does not detect embedded build-system dependent paths in the generated packages.

That's why I propose to run the test_package tests in a different conan home.
This would require to run the tests with a different CONAN_USER_HOME and CONAN_USER_HOME_SHORT environment variable.
Also, the generated packages (+ its dependencies) should be copied to the new conan home.
Additionally, care should be taken for packages in CONAN_USER_HOME_SHORT, that its random subdirectory is randomized again.

enhancement low

Most helpful comment

@uilianries

While working on the bison recipe, this issue emerged again.
The bison binary can hold a hardcoded path to m4.
https://github.com/bincrafters/conan-center-index/pull/9

To test whether the relocatable thing was working ok, I had to do the following things:

  1. build the package conan create . bison/3.5.3@
  2. Start conan_server and upload the bison recipe conan upload -r local --all bison/3.5.3@
  3. Hide the conan cache by moving ~/.conan to ~/conan_tmp
  4. In another terminal:

    1. set CONAN_USER_HOME to /tmp/

    2. remove bison in this other conan cache: conan remove -f bison/3.5.3@

    3. run the test conan test /path/to/bison/test/package bison/3.5.3@ -tbf /tmp/test_bison

This should be tested by CCI.

All 2 comments

@uilianries

While working on the bison recipe, this issue emerged again.
The bison binary can hold a hardcoded path to m4.
https://github.com/bincrafters/conan-center-index/pull/9

To test whether the relocatable thing was working ok, I had to do the following things:

  1. build the package conan create . bison/3.5.3@
  2. Start conan_server and upload the bison recipe conan upload -r local --all bison/3.5.3@
  3. Hide the conan cache by moving ~/.conan to ~/conan_tmp
  4. In another terminal:

    1. set CONAN_USER_HOME to /tmp/

    2. remove bison in this other conan cache: conan remove -f bison/3.5.3@

    3. run the test conan test /path/to/bison/test/package bison/3.5.3@ -tbf /tmp/test_bison

This should be tested by CCI.

@madebr Thanks for sharing the steps!

Was this page helpful?
0 / 5 - 0 ratings