From 772c1d8f90f96c12f168ded9087a7dbe497b404f Mon Sep 17 00:00:00 2001 From: Maveno Date: Fri, 25 Oct 2024 22:58:45 +0200 Subject: [PATCH] ff --- bin/ffx/test/helper.py | 4 +++- bin/ffx/test/scenario1.py | 12 ++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bin/ffx/test/helper.py b/bin/ffx/test/helper.py index 757cf7c..922262f 100644 --- a/bin/ffx/test/helper.py +++ b/bin/ffx/test/helper.py @@ -178,12 +178,14 @@ def createMediaFile(directory: str = '', commandTokens += [outputPath] - print(f"command sequence: {commandTokens}") out, err, rc = executeProcess(commandTokens) if rc: print(f"Creating testfile failed with {rc}: {err}") + return outputPath + + def createEmptyDirectory(): return tempfile.mkdtemp() diff --git a/bin/ffx/test/scenario1.py b/bin/ffx/test/scenario1.py index 7c4a3bb..cbf9f4d 100644 --- a/bin/ffx/test/scenario1.py +++ b/bin/ffx/test/scenario1.py @@ -1,8 +1,9 @@ -import click +import os, sys, click from .scenario import Scenario from ffx.test.helper import createMediaFile +from ffx.process import executeProcess class Scenario1(Scenario): """Creating file VAa, h264/aac/aac @@ -19,5 +20,12 @@ class Scenario1(Scenario): click.echo(f"Running scenario 1") - createMediaFile(directory=self._testDirectory) + mediaFilePath = createMediaFile(directory=self._testDirectory) + commandSequence = [sys.executable, os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'ffx.py'), '--help'] + + + click.echo(f"Scenarion 1 test sequence: {commandSequence}") + + out, err, rc = executeProcess(commandSequence) + click.echo(out)