Skip to content

Commit

Permalink
Fixed errors in the psyclone system tests - Issue #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Junwei Lyu committed Mar 1, 2024
1 parent 2cbec69 commit 378b47f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ contains
! Set the new field to a constant value and compute the divergence of it
divergence => get_div()
s = 2.0_r_def
call invoke( name = "Compute divergence", &
call invoke( name = "Compute_divergence", &
setval_c(field_2, s ), &
setval_c(field_1, 0.0_r_def), &
my_kernel_type(field_1, field_2, divergence) )
Expand Down
15 changes: 8 additions & 7 deletions tests/system_tests/psyclone/test_psyclone.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# ##############################################################################
import filecmp
import shutil
import glob
from os import unlink
from pathlib import Path
from unittest import mock
Expand Down Expand Up @@ -160,17 +161,17 @@ def test_run(self, config):
config.build_output / 'algorithm/algorithm_mod_psy.f90',

# Expect these prebuild files
# todo: the kernal hash differs between fpp and cpp, perhaps just use wildcards.
config.prebuild_folder / 'algorithm_mod.1602753696.an', # x90 analysis result
config.prebuild_folder / 'my_kernel_mod.4187107526.an', # kernel analysis results
config.prebuild_folder / 'algorithm_mod.5088673431.f90', # prebuild
config.prebuild_folder / 'algorithm_mod_psy.5088673431.f90', # prebuild
# The kernel hash differs between fpp and cpp, so just use wildcards.
config.prebuild_folder / 'algorithm_mod.*.an', # x90 analysis result
config.prebuild_folder / 'my_kernel_mod.*.an', # kernel analysis results
config.prebuild_folder / 'algorithm_mod.*.f90', # prebuild
config.prebuild_folder / 'algorithm_mod_psy.*.f90', # prebuild
]

assert all(not f.exists() for f in expect_files)
assert all(not any(glob.glob(str(f))) for f in expect_files)
with config:
self.steps(config)
assert all(f.exists() for f in expect_files)
assert all(any(glob.glob(str(f))) for f in expect_files)

def test_prebuild(self, tmp_path, config):
with config:
Expand Down

0 comments on commit 378b47f

Please sign in to comment.