Skip to content

Remove iree/tools/run_lit.* scripts when using cmake #818

Closed

Description

@GMNGeoffrey

This is not tickled by our scripts atm, but I encountered it while trying to debug some lit tests. Our run_lit script traverses the runfiles directory to find executables. All our lit tests run in the binary root directory so they can find all the executables. I think this causes inter-test interaction with tmp directories. I think find starts looking in a directory and then another test deletes it.

If I invoke find_executables not as part of a for loop tests fail iff I'm running in parallel.

#817 has the repro

I'm not going to keep investigating right now because I don't want to bury too much time in bash debugging. I think the right fix is to copy over the data deps to a runfiles dir. We could also probably use this to set the path to just those data deps rather than doing a find across the entire directory tree.

Activity

  1. GMNGeoffrey commented on Feb 27, 2020

    @GMNGeoffrey
    MemberAuthor

    We've now actually seen this in the wild. I think we should prioritize fixing it. Some options:

    1. Pass run_lit the binaries it should look for as some sort of argument so it can load only those into the PATH (that actually seems better anyway).
    2. Create a RUNFILES dir for the data a'la bazel

    These aren't really mutually exclusive. I think they're maybe both a good idea. 2 is imposing more bazelness on cmake, which we may or may not want. 1 would require changes to bazel as well, but seems maybe better than putting a whole find traversal in there

  2. added
    infrastructure
    on Mar 19, 2020
  3. GMNGeoffrey commented on Mar 21, 2020

    @GMNGeoffrey
    MemberAuthor

    Notably I think (1) would also be good for mac build issues @phoenix-meadowlark is experiencing. Our current find command doesn't work on mac. We can of course make it work, but just adding the few binaries it needs seems better.

  4. added this to the Infrastructure Fixit milestone on Apr 15, 2020
  5. benvanik commented on Nov 22, 2020

    @benvanik
    Collaborator

    We should not be using run_lit in cmake as there's no concept of runfiles and having the script breaks cmake testing/debugging workflows.

  6. changed the title [-]run_lit in cmake concurrency weirdness[/-] [+]Remove iree/tools/run_lit.* scripts when using cmake[/+] on Nov 22, 2020
  7. added
    quality of life 😊
    on Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructurequality of life 😊

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions