Skip to content

Commit

Permalink
Merge pull request idaholab#20585 from permcody/install_tests_fix
Browse files Browse the repository at this point in the history
Make make_install tests more robust
  • Loading branch information
lindsayad committed Mar 17, 2022
2 parents d6042b5 + 9788e19 commit 83ee3d4
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions test/tests/make_install/tests
Expand Up @@ -14,7 +14,12 @@
requirement = 'The system shall support the ability to "install" inputs:'
[setup_fake_test_structure]
type = 'RunCommand'
command = 'rm -rf moose_test_tests; rm -rf ../../../share/moose_test; mkdir -p ../../../share/moose_test/tests/version; cp ../misc/version/tests ../../../share/moose_test/tests/version; cp ../../testroot ../../../share/moose_test/tests/'
command = 'rm -rf ../../../make_install_test;
rm -rf ../../../share/moose_test;
mkdir -p ../../../share/moose_test/tests/version;
cp ../misc/version/tests ../../../share/moose_test/tests/version;
cp ../../testroot ../../../share/moose_test/tests/;
mkdir -p ../../../make_install_test'
installed = False

detail = 'from a pre-determined user-readable location;'
Expand All @@ -23,6 +28,7 @@
[copy_tests]
type = 'RunApp'
cli_args = "--copy-inputs tests"
working_directory = '../../../make_install_test'
no_additional_cli_args = True
expect_out = 'Directory successfully copied'
installed = False
Expand All @@ -33,6 +39,7 @@

[check_files]
type = 'CheckFiles'
working_directory = '../../../make_install_test'
input = 'DUMMY'
should_execute = False
check_files = 'moose_test_tests/testroot moose_test_tests/version/tests'
Expand All @@ -44,6 +51,7 @@

[copy_warn_overwrite]
type = 'RunException'
working_directory = '../../../make_install_test'
cli_args = "--copy-inputs tests"
no_additional_cli_args = True
expect_err = 'The directory \S+ already exists.'
Expand All @@ -55,10 +63,12 @@

[link_exec_installed]
type = 'RunCommand'
command = 'ln -s ../../../moose_test-opt .'
working_directory = "./moose_test_tests"
command = 'for bin in `ls ../../test/moose_test-*`
do
ln -sf $bin .
done'
working_directory = '../../../make_install_test/moose_test_tests'
installed = False
method = opt
prereq = 'test_copy_install/copy_warn_overwrite'

detail = 'able to link a binary to an installed location;'
Expand All @@ -67,18 +77,18 @@
[run]
type = 'RunApp'
cli_args = "--run tests"
working_directory = "./moose_test_tests"
working_directory = "../../../make_install_test/moose_test_tests"
no_additional_cli_args = True
installed = False
method = opt
prereq = 'test_copy_install/link_exec_installed'

detail = 'able to successfully launch the TestHarness using a MOOSE-based binary;'
[]

[tear_down]
type = 'RunCommand'
command = 'rm -rf ../../../share/; rm -rf moose_test_tests'
command = 'rm -rf ../../../share/;
rm -rf ../../../make_install_test'
prereq = 'test_copy_install/run'
installed = False

Expand Down

0 comments on commit 83ee3d4

Please sign in to comment.