|
1 | 1 | """Testing ast_transformer module on FFB-MINI application.""" |
2 | 2 |
|
3 | 3 | import logging |
| 4 | +import os |
4 | 5 | import pathlib |
5 | 6 | import platform |
6 | 7 | import unittest |
|
11 | 12 |
|
12 | 13 | _HERE = pathlib.Path(__file__).resolve().parent |
13 | 14 |
|
| 15 | +_ROOT = _HERE.parent |
| 16 | + |
| 17 | +_APPS_ROOT = pathlib.Path(os.environ.get('TEST_APPS_ROOT', _ROOT.parent)).resolve() |
| 18 | + |
14 | 19 | _APPS_ROOT_PATHS = { |
15 | 20 | 'miranda_io': pathlib.Path('..', 'miranda_io'), |
16 | 21 | 'FLASH-4.5': pathlib.Path('..', 'flash-4.5'), |
17 | 22 | 'FLASH-SUBSET': pathlib.Path('..', 'flash-subset', 'FLASH4.4'), |
18 | | - 'FFB-MINI': pathlib.Path('..', 'ffb-mini')} |
| 23 | + 'FFB-MINI': pathlib.Path('..', 'ffb-mini'), |
| 24 | + 'flash5': _APPS_ROOT.joinpath('flash5')} |
19 | 25 |
|
20 | 26 | _APPS_OPTIONAL = {'FLASH-4.5', 'FLASH-SUBSET'} |
21 | 27 |
|
|
52 | 58 | ] + _FLASH_COMMON_PATHS] if 'FLASH-SUBSET' in _APPS_ROOT_PATHS else [], |
53 | 59 | 'FFB-MINI': [path for path in all_fortran_paths(_APPS_ROOT_PATHS['FFB-MINI'].joinpath('src')) |
54 | 60 | if path.name not in ('gfc.h', 'gfrd_c.h', 'gfutil_c.h', 'gfutil_f.h', 'gfwrt_c.h', |
55 | | - 'maprof.h', 'maprof_proc.h', 'maprof_yaml.h')]} |
| 61 | + 'maprof.h', 'maprof_proc.h', 'maprof_yaml.h')], |
| 62 | + 'flash5': [_APPS_ROOT_PATHS['flash5'].joinpath('source', _) for _ in { |
| 63 | + pathlib.Path('physics', 'Hydro', 'HydroMain', 'unsplit', 'hy_getFaceFlux.F90'), |
| 64 | + pathlib.Path('physics', 'Hydro', 'HydroMain', 'unsplit', 'hy_getRiemannState.F90'), |
| 65 | + pathlib.Path('physics', 'Hydro', 'HydroMain', 'unsplit', 'hy_TVDslope.F90'), |
| 66 | + pathlib.Path('physics', 'Hydro', 'HydroMain', 'unsplit', 'hy_upwindTransverseFlux.F90'), |
| 67 | + pathlib.Path('physics', 'Hydro', 'HydroMain', 'unsplit', 'MHD', 'hy_eigenVector.F90'), |
| 68 | + pathlib.Path('physics', 'Eos', 'EosMain', 'Helmholtz_starkiller', 'SpeciesBased', |
| 69 | + 'actual_eos.F90'), |
| 70 | + pathlib.Path('physics', 'sourceTerms', 'Burn', 'BurnMain', 'nuclearBurn', 'Aprox13', |
| 71 | + 'bn_mapNetworkToSpecies.F90'), |
| 72 | + pathlib.Path('physics', 'sourceTerms', 'Burn', 'BurnMain', 'nuclearBurn', 'bn_burner.F90'), |
| 73 | + pathlib.Path('physics', 'sourceTerms', 'Burn', 'BurnMain', 'nuclearBurn', 'Burn.F90'), |
| 74 | + pathlib.Path('Simulation', 'Simulation_init.F90')}]} |
56 | 75 |
|
57 | 76 |
|
58 | 77 | class Tests(unittest.TestCase): |
@@ -93,3 +112,6 @@ def test_ffb_mini(self): |
93 | 112 | @unittest.skipIf(platform.system() == 'Windows', 'OFC not available on Windows') |
94 | 113 | def test_ffb_mini_with_ofc(self): |
95 | 114 | self._run_app_test('FFB-MINI', None, 35, True) |
| 115 | + |
| 116 | + def test_flash5(self): |
| 117 | + self._run_app_test('flash5', None, 9) |
0 commit comments