Skip to content

Commit a6e96ed

Browse files
Merge pull request #3 from prwolfe/remove_testing_temporary
This simply unlinks the 'package_subproject_list.cmake' temporary cre…
2 parents 3e9a1ac + 4a8dddf commit a6e96ed

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

cmake/std/unittests/TestPullRequestLinuxDriverTest.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def test_verifyTargetBranch_passes_with_master_target_mm_source(self):
207207
l_environ, \
208208
mock.patch('PullRequestLinuxDriverTest.createPackageEnables'), \
209209
mock.patch('PullRequestLinuxDriverTest.setBuildEnviron'), \
210+
mock.patch('PullRequestLinuxDriverTest.compute_n', return_value=20), \
210211
mock.patch('PullRequestLinuxDriverTest.getCDashTrack') as m_cdtr:
211212
PullRequestLinuxDriverTest.run()
212213

@@ -319,14 +320,16 @@ def setUp(self):
319320

320321
def success_side_effect(self):
321322
with open('packageEnables.cmake', 'w') as f_out:
322-
f_out.write('''
323-
MACRO(PR_ENABLE_BOOL VAR_NAME VAR_VAL)
324-
MESSAGE("-- Setting ${VAR_NAME} = ${VAR_VAL}")
325-
SET(${VAR_NAME} ${VAR_VAL} CACHE BOOL "Set in $CMAKE_PACKAGE_ENABLES_OUT")
326-
ENDMACRO()
327-
''')
323+
f_out.write(dedent('''\
324+
MACRO(PR_ENABLE_BOOL VAR_NAME VAR_VAL)
325+
MESSAGE("-- Setting ${VAR_NAME} = ${VAR_VAL}")
326+
SET(${VAR_NAME} ${VAR_VAL} CACHE BOOL "Set in $CMAKE_PACKAGE_ENABLES_OUT")
327+
ENDMACRO()
328+
'''))
328329
f_out.write("PR_ENABLE_BOOL(Trilinos_ENABLE_FooPackageBar ON)")
329-
330+
with open ('package_subproject_list.cmake', 'w') as f_out:
331+
f_out.write(dedent('''\
332+
set(CTEST_LABELS_FOR_SUBPROJECTS TrilinosFrameworkTests '''))
330333

331334
def test_call_success(self):
332335
expected_output = '''Enabled packages:
@@ -349,6 +352,7 @@ def test_call_success(self):
349352
'package_subproject_list.cmake'])
350353
self.assertEqual(expected_output, m_stdout.getvalue())
351354
os.unlink('packageEnables.cmake')
355+
os.unlink('package_subproject_list.cmake')
352356

353357

354358
def test_call_python2(self):
@@ -366,6 +370,7 @@ def test_call_python2(self):
366370
m_out.assert_not_called()
367371
self.assertEqual(expected_output, m_stdout.getvalue())
368372
os.unlink('packageEnables.cmake')
373+
os.unlink('package_subproject_list.cmake')
369374

370375

371376
def test_call_failure(self):

0 commit comments

Comments
 (0)