reframe-hpc / reframe

A powerful Python framework for writing and running portable regression tests and benchmarks for HPC systems.
https://reframe-hpc.readthedocs.org
BSD 3-Clause "New" or "Revised" License
213 stars 100 forks source link

How to define a reframe test which uses a git repo plus some local files #3159

Closed sjpb closed 3 months ago

sjpb commented 3 months ago

Conceptually, I want to do something like this:

class MyTest(rfm.RunOnlyRegressionTest):
    ...
    sourcesdir = [
       'https://github.com/myrepo/myrepo.git',
       'inputs/'
    ]
  prerun_cmds = ['expand.py inputs/foo.txt']

i.e. have the test use (= have available in staging directory, I think?) both files from a repo plus some files I've included in the test definition, and then preprocess those input files before running the tests.

Is there a simple way of doing this? So far I've tried:

vkarak commented 3 months ago

I would do the opposite of your first choice: use the sourcesdir to point to the local files of the test and then do explicitly the git clone in the prerun_cmds.

sjpb commented 3 months ago

Hah that was the workaround I ended up with after posting this! So good to know that wasn't totally daft but I felt like this must be a really common use-case.

vkarak commented 3 months ago

Maybe others have stumbled on this, but it's the first time being reported and thanks! If we get more user requests on this, we will consider extending sourcesdir syntax.