summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/subprocess/test/xpcshell/data_test_script.py
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
commit39dac57259cff8b61db0b22cb2ad0a8adb02692e (patch)
tree52a026cc8c22793eb17fd0f5e22adce1ae08a1dd /toolkit/modules/subprocess/test/xpcshell/data_test_script.py
parenta1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff)
parentc2d9ab62f3d097c9e0e00184cab1f546554f5eaa (diff)
downloadUXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.gz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.lz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.xz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.zip
Merge branch 'redwood' into 28.9-platform
Diffstat (limited to 'toolkit/modules/subprocess/test/xpcshell/data_test_script.py')
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/data_test_script.py55
1 files changed, 0 insertions, 55 deletions
diff --git a/toolkit/modules/subprocess/test/xpcshell/data_test_script.py b/toolkit/modules/subprocess/test/xpcshell/data_test_script.py
deleted file mode 100644
index 035d8ac56..000000000
--- a/toolkit/modules/subprocess/test/xpcshell/data_test_script.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env python2
-from __future__ import print_function
-
-import os
-import signal
-import struct
-import sys
-
-
-def output(line):
- sys.stdout.write(struct.pack('@I', len(line)))
- sys.stdout.write(line)
- sys.stdout.flush()
-
-
-def echo_loop():
- while True:
- line = sys.stdin.readline()
- if not line:
- break
-
- output(line)
-
-
-if sys.platform == "win32":
- import msvcrt
- msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
-
-
-cmd = sys.argv[1]
-if cmd == 'echo':
- echo_loop()
-elif cmd == 'exit':
- sys.exit(int(sys.argv[2]))
-elif cmd == 'env':
- for var in sys.argv[2:]:
- output(os.environ.get(var, ''))
-elif cmd == 'pwd':
- output(os.path.abspath(os.curdir))
-elif cmd == 'print_args':
- for arg in sys.argv[2:]:
- output(arg)
-elif cmd == 'ignore_sigterm':
- signal.signal(signal.SIGTERM, signal.SIG_IGN)
-
- output('Ready')
- while True:
- try:
- signal.pause()
- except AttributeError:
- import time
- time.sleep(3600)
-elif cmd == 'print':
- sys.stdout.write(sys.argv[2])
- sys.stderr.write(sys.argv[3])