Makes 'tests' importable.

This allows individual tests to be run using 'unittest'.
Differentiate between internal and external flags.

Dependents use external flags, whereas building components and test drivers use
both internal and external flags.