Skip to content

Split --disable-tests, fix cross builds#9611

Merged
roberth merged 1 commit intoNixOS:masterfrom
obsidiansystems:fix-cross-configure
Dec 18, 2023
Merged

Split --disable-tests, fix cross builds#9611
roberth merged 1 commit intoNixOS:masterfrom
obsidiansystems:fix-cross-configure

Conversation

@Ericson2314
Copy link
Member

Motivation

It might seem obnoxious to have yet more configure flags, but I found controlling both the unit and functional tests with one flag was quite confusing because they are so different:

  • unit tests depending on building, functional tests don't (e.g. when we test already-built Nix)

  • unit tests can be installed, functional tests cannot

  • unit tests neeed extra libraries (GTest, RapidCheck), functional tests need extra executables (jq).

  • unit tests are run by make check, functional tests are run by make installcheck

Really on a technical level, they seem wholly independent. Only on a human level ("they are both are tests") do they have anything in common.

I had messed up the logic in cross builds because of this. Now I split the flag in two (and cleaned up a few other inconsistencies), and the logic fixed itself.

Context

I broke cross builds in #9535

Priorities

Add 👍 to pull requests you find important.

Copy link
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

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

Looks about right, and seems to simplify the docs build logic, which I of course approve.

Please someone else review it properly.

@Ericson2314 Ericson2314 added the idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. label Dec 15, 2023
@Ericson2314
Copy link
Member Author

Discussed in Nix team meeting:

Solution to "disable makefile" controversy is just inlining them to where they are used, the top-level Makefile.

Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

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

Otherwise looks good.

It might seem obnoxious to have yet more configure flags, but I found
controlling both the unit and functional tests with one flag was quite
confusing because they are so different:

- unit tests depending on building, functional tests don't (e.g. when
  we test already-built Nix)

- unit tests can be installed, functional tests cannot

- unit tests neeed extra libraries (GTest, RapidCheck), functional
  tests need extra executables (jq).

- unit tests are run by `make check`, functional tests are run by `make
  installcheck`

Really on a technical level, they seem wholly independent. Only on a
human level ("they are both are tests") do they have anything in common.

I had messed up the logic in cross builds because of this. Now I
split the flag in two (and cleaned up a few other inconsistencies), and
the logic fixed itself.

Co-Authored-By: Robert Hensing <roberth@users.noreply.github.com>
@roberth roberth enabled auto-merge December 18, 2023 15:50
@roberth roberth merged commit 5d5b25f into NixOS:master Dec 18, 2023
@thufschmitt
Copy link
Member

This fixed a CI failure (https://github.com/NixOS/nix/actions/runs/7204404968/job/19626137839, complaining about a failing jq in a cross job), but caused another one (https://github.com/NixOS/nix/actions/runs/7250906152/job/19753759380, complaining about make check ran while the tests were disabled).

@Ericson2314 can you take a look?

@Ericson2314 Ericson2314 deleted the fix-cross-configure branch December 20, 2023 07:36
@Ericson2314
Copy link
Member Author

#9646 Fixed here @thufschmitt .

@wegank wegank mentioned this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants