Information about mix project from iex

How is the proper way to get information about the running app from iex?
Should I trust Mix.Project info? is it always relliable or is there a better way to access such information.

I most worried about:

  • what is the main app of the project?
  • is it umbrella? if umbrella what are it’s children app name?
  • what are the apps(dependencies) that are not umbrella apps?
  • what are the modules loaded by each of those apps?

I’m working on a tool to use in dev/test environment and I wanted some way to properly extract that info without needing to resort to user explicit configuration.

Also is there a way to trigger running tests directly from iex/running system or i’ll need to call mix using System.cmd?

Mix.Compilers.Test.require_and_run(["test/foo_test.exs"], [], [], [])