Skip to content

Commit

Permalink
Make sure FMGs error on LFS pointer files refs idaholab#17407
Browse files Browse the repository at this point in the history
  • Loading branch information
GiudGiud committed Jan 1, 2024
1 parent 571d361 commit dbe12f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions framework/src/meshgenerators/FileMeshGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ FileMeshGenerator::generate()
if (exodus)
{
auto exreader = std::make_shared<ExodusII_IO>(*mesh);
MooseUtils::checkFileReadable(_file_name);

if (has_exodus_integers)
exreader->set_extra_integer_vars(
Expand Down Expand Up @@ -108,6 +109,7 @@ FileMeshGenerator::generate()

// Supports old suffix (xxxx_mesh.cpr -> xxxx-mesh.cpr) and LATEST
const auto file_name = deduceCheckpointPath(*this, _file_name);
MooseUtils::checkFileReadable(file_name);

mesh->skip_partitioning(_skip_partitioning);
mesh->allow_renumbering(_allow_renumbering);
Expand Down
1 change: 0 additions & 1 deletion test/tests/misc/check_error/mesh_pointer_error_check.i
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[Mesh]
file = mesh_pointer.e
[]

[Variables]
Expand Down
13 changes: 12 additions & 1 deletion test/tests/misc/check_error/tests
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,19 @@
type = 'RunException'
input = 'mesh_pointer_error_check.i'
expect_err = 'appears to be a Git-LFS pointer'
cli_args = 'Mesh/file=mesh_pointer.e'

requirement = 'The system shall report an error when a git-lfs file pointer is encountered.'
requirement = 'The system shall report an error when a git-lfs file pointer is encountered for the mesh file.'
design = 'MooseUtils.md'
issues = '#17407'
[]
[check_git_lfs_pointer_fmg]
type = 'RunException'
input = 'mesh_pointer_error_check.i'
expect_err = 'appears to be a Git-LFS pointer'
cli_args = 'Mesh/fmg/type=FileMeshGenerator Mesh/fmg/file=mesh_pointer.e'

requirement = 'The system shall report an error when a git-lfs file pointer is encountered for the mesh for a mesh generator.'
design = 'MooseUtils.md'
issues = '#17407'
[]
Expand Down

0 comments on commit dbe12f0

Please sign in to comment.