-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Description
We should rethink the fact that we deep copy the whole regression test instances for each test case (environment, system, partition). It is definitely necessary for isolating them and unties our hands in the asynchronous execution policy, but it imposes some restrictions on how we should write regression tests. Anything that cannot be deep-copied (e.g., I/O streams, generators etc.) it cannot be used in a regression test. For example, the following although it's pretty much good valid Python, we do not support it:
self.sanity_patterns = sn.all(sn.assert_found(r'sth', fname)
for fname in sn.iglob('file*.txt'))The problem is that the argument to sn.all() is a generator and cannot be deep-copied. Instead, we should write this using a list comprehension:
self.sanity_patterns = sn.all([sn.assert_found(r'sth', fname)
for fname in sn.iglob('file*.txt')])Internal issue: https://madra.cscs.ch/scs/reframe/issues/524