summaryrefslogtreecommitdiffstats
path: root/test/DVIPDF
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-02-07 18:52:53 (GMT)
committerMats Wichmann <mats@linux.com>2020-02-07 23:39:37 (GMT)
commite8e8d71df80b9b690ef9f2d5b83378f23677e30f (patch)
tree975bfaf04b6b8d63d86fcb0827f4b8e8d226af73 /test/DVIPDF
parentef011014b343288919292560fa24e108874c059a (diff)
downloadSCons-e8e8d71df80b9b690ef9f2d5b83378f23677e30f.zip
SCons-e8e8d71df80b9b690ef9f2d5b83378f23677e30f.tar.gz
SCons-e8e8d71df80b9b690ef9f2d5b83378f23677e30f.tar.bz2
Stop calling os.system in tests.
This converts the remaining tests that called os.system themselves to use subprocess instead. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/DVIPDF')
-rw-r--r--test/DVIPDF/DVIPDF.py5
-rw-r--r--test/DVIPDF/DVIPDFFLAGS.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/test/DVIPDF/DVIPDF.py b/test/DVIPDF/DVIPDF.py
index 87f4012..1c017a9 100644
--- a/test/DVIPDF/DVIPDF.py
+++ b/test/DVIPDF/DVIPDF.py
@@ -107,11 +107,12 @@ tex = test.where_is('tex')
if dvipdf and tex:
- test.write("wrapper.py", """import os
+ test.write("wrapper.py", """\
+import subprocess
import sys
cmd = " ".join(sys.argv[1:])
open('%s', 'a').write("%%s\\n" %% cmd)
-os.system(cmd)
+subprocess.run(cmd, shell=True)
""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """
diff --git a/test/DVIPDF/DVIPDFFLAGS.py b/test/DVIPDF/DVIPDFFLAGS.py
index 30d0e4f..9ecb736 100644
--- a/test/DVIPDF/DVIPDFFLAGS.py
+++ b/test/DVIPDF/DVIPDFFLAGS.py
@@ -111,11 +111,12 @@ tex = test.where_is('tex')
if dvipdf and tex:
- test.write("wrapper.py", """import os
+ test.write("wrapper.py", """\
+import subprocess
import sys
cmd = " ".join(sys.argv[1:])
open('%s', 'a').write("%%s\\n" %% cmd)
-os.system(cmd)
+subprocess.run(cmd, shell=True)
""" % test.workpath('wrapper.out').replace('\\', '\\\\'))
test.write('SConstruct', """