Skip to content

Commit

Permalink
Merge pull request #9 from hiker/fix_test_error
Browse files Browse the repository at this point in the history
Fix test error - Issue #4, #5
  • Loading branch information
hiker authored Mar 12, 2024
2 parents 14d0e59 + 7791733 commit 63d2ddc
Show file tree
Hide file tree
Showing 5 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
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((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((glob.glob(str(f)) != []) for f in expect_files)

def test_prebuild(self, tmp_path, config):
with config:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 63d2ddc

Please sign in to comment.