Skip to content

Commit

Permalink
MauiBlazor iOS Scenarios (#2387)
Browse files Browse the repository at this point in the history
* MauiBlazorIOS Scenario

* MAUI Mac Catalyst

* Revert "MAUI Mac Catalyst"

This reverts commit 6a25e00.
  • Loading branch information
TanayParikh authored Apr 20, 2022
1 parent 2c55313 commit 851dec7
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/scenarios/mauiblazorios/post.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'''
post cleanup script
'''

from shared.postcommands import clean_directories

clean_directories()
42 changes: 42 additions & 0 deletions src/scenarios/mauiblazorios/pre.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'''
pre-command
'''
import sys
import os
from zipfile import ZipFile
from performance.logger import setup_loggers, getLogger
from shutil import copyfile, copytree, move
from shared.const import PUBDIR
from argparse import ArgumentParser

setup_loggers(True)

parser = ArgumentParser()
parser.add_argument('--unzip', help='Unzip ipa file and report extracted tree', action='store_true', default=False)
parser.add_argument(
'--name',
dest='name',
required=True,
type=str,
help='Name of the file/folder to setup (with .app or .ipa)')
args = parser.parse_args()

name = args.name
namezip = '%s.zip' % (name)
if not os.path.exists(PUBDIR):
os.mkdir(PUBDIR)
if not os.path.exists(name):
getLogger().error('Cannot find %s' % (name))
exit(-1)
if args.unzip:
if not os.path.exists(namezip):
copyfile(name, namezip)

with ZipFile(namezip) as zip:
zip.extractall(os.path.join('.', PUBDIR))

else:
if(os.path.isdir(name)):
copytree(name, PUBDIR, dirs_exist_ok=True)
else:
copyfile(name, os.path.join(PUBDIR, name))
12 changes: 12 additions & 0 deletions src/scenarios/mauiblazorios/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'''
C# Console app
'''
from shared.runner import TestTraits, Runner

EXENAME = 'MauiBlazoriOSDefault'

if __name__ == "__main__":
traits = TestTraits(exename=EXENAME,
guiapp='false',
)
Runner(traits).run()

0 comments on commit 851dec7

Please sign in to comment.