Integration tests not idempotent and self contained

The integration tests in buildstream-tests (to be moved into buildstream itself pending #96 (closed)), have a fairly easily usable run-tests.sh script, but currently it is not practical to run them on your host as a developer.

Problems here include:

  • Second run of tests is not the same as the first; mess from previous run is not cleaned up
  • Pollutes user caches
    • Undesired artifacts end up in the user's local artifact cache, instead of being directed to a test location
    • Sources also end up in the user local source cache, instead of in a separate location

To make working on the tests easier, the above should be fixed.

This should be done with consideration of CI context, the frontend runner script should be encapsulating all logic deciding where buildstream caches for the tests are stored and anything which might differ from one CI context to another vs. running the tests locally.

Defaults should prefer locally running tests; because arguments to run-tests.sh only need to be written once in the .gitlab-ci.yml