tests: Remove Python 2.7 glue code

Remove uses of six and from __future__ imports as they are no longer
needed.

Change-Id: I74b5250722abe1e202f31a9ec1d4cc04039df168
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39757
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Andreas Sandberg
2021-01-26 12:35:03 +00:00
parent 9f31b5c576
commit cbcd3ecf15
9 changed files with 4 additions and 17 deletions

View File

@@ -33,8 +33,6 @@
# Author: Brad Beckmann
#
from __future__ import print_function
import m5
from m5.objects import *
from m5.defines import buildEnv

View File

@@ -42,12 +42,10 @@ from common import FSConfig
from common import Options
from common.Caches import *
from ruby import Ruby
from six import add_metaclass
_have_kvm_support = 'BaseKvmCPU' in globals()
@add_metaclass(ABCMeta)
class BaseSystem(object):
class BaseSystem(object, metaclass=ABCMeta):
"""Base system builder.
This class provides some basic functionality for creating an ARM

View File

@@ -33,8 +33,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
from multiprocessing import Process
import sys
import os

View File

@@ -33,8 +33,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import m5
import _m5
from m5.objects import *

View File

@@ -44,7 +44,8 @@ import socket
import threading
import gzip
from six.moves import urllib
import urllib.error
import urllib.request
from testlib.fixture import Fixture
from testlib.configuration import config, constants

View File

@@ -36,8 +36,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import sys
import os
import os.path

View File

@@ -28,7 +28,6 @@
Test file for simple memory test
TODO: Add stats checking
'''
import six
from testlib import *
@@ -50,7 +49,7 @@ simple_mem_params = [
for name, params in simple_mem_params:
args = ['--' + key + '=' + val for key,val in six.iteritems(params)]
args = ['--' + key + '=' + val for key,val in params.items()]
gem5_verify_config(
name='simple_mem_' + name,

View File

@@ -5,7 +5,6 @@ loaders.
Discovers and runs all tests from a given root directory.
'''
from __future__ import print_function
import sys
import os

View File

@@ -36,8 +36,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
import os
import sys
import re