-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TST Framework for running functional tests on S3DF #64
Draft
gadorlhiac
wants to merge
15
commits into
slac-lcls:dev
Choose a base branch
from
gadorlhiac:TST/functional_suite
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… installation where launched.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR provides a framework for running functional tests of workflows on S3DF.
Under
tests/functional
each test is given a sub-directory which must contain:config.yaml
to specify the LUTE config YAML for running the test workflow. This YAML must specify anexperiment
andrun
. It cannot rely on retrieving this information from the eLog or the command-line.dag.yaml
: A workflow specification in line with the dyanmic Airflow DAG YAML syntax for LUTE.Each test sub-directory may also contain:
README.md
file to explain the test.SHOULD_FAIL
file which is empty. This should be provided if the workflow is expected to fail and the test should be marked succesful if it does.Checklist
run_functional.py
script to run all functional tests.submit_run_functional.sh
to supervise tests from a batch job.PR Type:
Address issues:
Simplify functional testing.
Testing
Usage
Full Script Usage
There are two main scripts:
run_functional.py
which does the bulk of the work, andsubmit_run_functional.sh
which is a thin wrapper to submit a SLURM job. As an alternative to a SLURM job,run_functional.py
can be run in the background with output redirected to a file, or perhaps more securely using, e.g.screen
.run_functional.py
can be used like:submit_run_functional.sh
transparently passes parameters so has the same interface.Example/walkthrough
$OUTPUT_DIR
can be replaced with any directory you would like to work in. The test script will create two folders in the directory:For the time being you should include
--git_pr_id 64
when running the command above. This ensures that LUTE gets cloned from this branch that actually has the tests to run. You can altenatively pass a directory which has been setup with a separate set of tests (see full usage above). After cloning this branch you could also use--use_local_tests
.--test_airflow
should be used to use the test Airflow instance. This is to get the improvements to the dynamic Airflow DAG which are needed to mark failure of a test properly. This will be pushed to the production Airflow on merging of this PR. The tests can be run without the improvements to the DAG (i.e. using the production Airflow instance) now as well, but may be incorrectly marked as successful/unsuccessful.The output folders are temporary (i.e.
lute
andlute_output
) and everything will be deleted when the tests have finished. The parentOUTPUT_DIR
will not be touched. It must exist before running the script and will not be created.You can examine the slurm output file as the tests run, or at the end. All the logs from each step should be there, but to check on the results of the tests,
grep
andtail
are sufficient.E.g.
Screenshots