Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
fetch-and-launch-reproducer,validate-inputs: add wrappers retriggering
Browse files Browse the repository at this point in the history
Add wrapper for retriggering builds and tests. Add script to validate
inputs.
  • Loading branch information
katieworton committed Nov 29, 2023
1 parent 505e051 commit bfcacda
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fetch-and-launch-reproducer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Environment variables needed:
# - TUXSUITE_TOKEN - the token to submit tuxsuite reproducer

TESTRUN=$1
REPRODUCER=$2
pip install -r requirements.txt
inputs="--testrun $TESTRUN --filename $REPRODUCER"
echo $inputs
python validate-inputs.py $inputs
python squad-create-reproducer-from-testrun $inputs --plan
tuxsuite plan $REPRODUCER
44 changes: 44 additions & 0 deletions validate-inputs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from argparse import ArgumentParser
import logging


logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


def parse_args(raw_args):
parser = ArgumentParser()

parser.add_argument(
"--testrun",
required=True,
help="The ID of the TestRun.",
)

parser.add_argument(
"--filename",
required=True,
help="The reproducer file.",
)

parser.add_argument(
"--plan",
required=False,
action="store_true",
default=False,
help="Fetch a TuxPlan reproducer rather than a TuxTest of TuxBuild reproducer.",
)

return parser.parse_args(raw_args)


def run(raw_args=None):
args = parse_args(raw_args)

logger.debug(args)

return 0


if __name__ == "__main__":
exit(run())

0 comments on commit bfcacda

Please sign in to comment.