Skip to content

Copy fixtures dir before running image tests

Adam Cohen requested to merge copy-fixtures-dir-before-running-tests into main

What does this MR do?

This MR copies the qa directory to a temporary dir in the present working directory where the test is being run. This is to prevent dependency files generated during a test from interfering with subsequent test runs when executing locally.

For example, let's assume we start with the following project structure:

.
└── gemnasium/
    └── qa/
        ├── scripts/
        ├── expect/
        └── fixtures/

Each time a complete test suite is run, a new tmp/qa-* directory will be created which contains all the fixtures generated by the analyzer:

.
└── gemnasium/
    ├── qa/
    │   ├── scripts
    │   ├── expect
    │   └── fixtures
    └── tmp/
        ├── qa-54805/
        │   ├── scripts
        │   ├── expect
        │   └── fixtures
        └── qa-57485/
            ├── scripts
            ├── expect
            └── fixtures

You can see an example of this by browsing the artifacts from a recent gemnasium pipeline here.

What are the relevant issue numbers?

Copy fixtures dir before running image tests (gitlab-org/gitlab#352464 - closed)

Testing

Tested here

Edited by Adam Cohen

Merge request reports