Commit 5fece51d authored by Dylan Baker's avatar Dylan Baker Committed by Dylan Baker

framework: update the rest of the piglit-* commands to be py3

Convert the rest of the commands using six to make them both python 2
and python 3 safe. This also changes the default chbang to python
instead of python2, which should only be a change on Arch linux.
Signed-off-by: 's avatarDylan Baker <dylanx.c.baker@intel.com>
parent b1ac7983
#!/usr/bin/env python2
#!/usr/bin/env python
# Copyright (c) 2014 Intel Corporation
# Copyright (c) 2014, 2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
......@@ -31,6 +31,11 @@ from __future__ import (
)
import sys
import six
from framework.programs.run import resume
resume([i.decode('utf-8') for i in sys.argv[1:]])
if six.PY2:
resume([i.decode('utf-8') for i in sys.argv[1:]])
elif six.PY3:
resume(sys.argv[1:])
#!/usr/bin/env python2
#!/usr/bin/env python
# Copyright (c) 2014 Intel Corporation
# Copyright (c) 2014, 2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
......@@ -31,6 +31,11 @@ from __future__ import (
)
import sys
import six
from framework.programs.run import run
run([i.decode('utf-8') for i in sys.argv[1:]])
if six.PY2:
run([i.decode('utf-8') for i in sys.argv[1:]])
elif six.PY3:
run(sys.argv[1:])
#!/usr/bin/env python2
#!/usr/bin/env python
# Copyright (c) 2014 Intel Corporation
# Copyright (c) 2014, 2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
......@@ -27,6 +27,11 @@ from __future__ import (
)
import sys
import six
from framework.programs.summary import html
html([i.decode('utf-8') for i in sys.argv[1:]])
if six.PY2:
html([i.decode('utf-8') for i in sys.argv[1:]])
elif six.PY3:
html(sys.argv[1:])
#!/usr/bin/env python2
#!/usr/bin/env python
# Copyright (c) 2014 Intel Corporation
# Copyright (c) 2014, 2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
......@@ -27,6 +27,11 @@ from __future__ import (
)
import sys
import six
from framework.programs.summary import console
console([i.decode('utf-8') for i in sys.argv[1:]])
if six.PY2:
console([i.decode('utf-8') for i in sys.argv[1:]])
elif six.PY3:
console(sys.argv[1:])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment