Skip to content

Commit

Permalink
Merge pull request #740 from vkarak/bugfix/duplicate-module-loads
Browse files Browse the repository at this point in the history
[bugfix] Fix duplicate module commands emitted while executing test cases
  • Loading branch information
vkarak committed Apr 9, 2019
2 parents 3724185 + bb978f6 commit d36ac09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 29 deletions.
8 changes: 2 additions & 6 deletions reframe/frontend/executors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
ReframeFatalError, TaskExit)
from reframe.frontend.printer import PrettyPrinter
from reframe.frontend.statistics import TestStats
from reframe.utility.sandbox import Sandbox

ABORT_REASONS = (KeyboardInterrupt, ReframeFatalError, AssertionError)

Expand All @@ -23,10 +22,8 @@ class TestCase:
def __init__(self, check, partition, environ):
self.__check_orig = check
self.__check = copy.deepcopy(check)

# Environments and partitions are immutable; no need to clone them
self.__partition = partition
self.__environ = environ
self.__environ = copy.deepcopy(environ)
self.__partition = copy.deepcopy(partition)

def __iter__(self):
# Allow unpacking a test case with a single liner:
Expand Down Expand Up @@ -220,7 +217,6 @@ def __init__(self, policy, printer=None, max_retries=0):
self._stats = TestStats()
self._policy.stats = self._stats
self._policy.printer = self._printer
self._sandbox = Sandbox()
self._environ_snapshot = EnvironmentSnapshot()

def __repr__(self):
Expand Down
8 changes: 0 additions & 8 deletions reframe/utility/sandbox.py

This file was deleted.

15 changes: 0 additions & 15 deletions unittests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,6 @@ class FieldTester:
self.assertRaises(ValueError, exec, 'tester.field = (100, 3, 65)',
globals(), locals())

def test_sandbox(self):
from reframe.core.environments import Environment
from reframe.core.systems import System
from reframe.utility.sandbox import Sandbox

environ = Environment('myenv')
system = System('mysystem')

sandbox = Sandbox()
sandbox.environ = environ
sandbox.system = system

self.assertIsNot(system, sandbox.system)
self.assertIsNot(environ, sandbox.environ)

def test_proxy_field(self):
class Target:
def __init__(self):
Expand Down

0 comments on commit d36ac09

Please sign in to comment.