summaryrefslogtreecommitdiff
path: root/pjutest
diff options
context:
space:
mode:
Diffstat (limited to 'pjutest')
-rwxr-xr-xpjutest35
1 files changed, 0 insertions, 35 deletions
diff --git a/pjutest b/pjutest
deleted file mode 100755
index 8edc4f2..0000000
--- a/pjutest
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python3
-#
-# pjutest - junit xml generator
-
-from junit_xml import TestSuite, TestCase
-from pickle import dump, load
-from subprocess import Popen, PIPE, STDOUT
-
-import os
-import sys
-
-if len (sys.argv) != 2:
- print("%s 'mycmd param1' # to record a test" % sys.argv[0])
- sys.exit(-1)
-
-if os.path.exists('pjutest.dat'):
- with open('pjutest.dat', 'r') as dat:
- tss = load(dat)
-else:
- tss = [TestSuite("suite", None)]
-
-p = Popen(sys.argv[1], shell=True, stdout=PIPE, stderr=PIPE)
-out,err = p.communicate()
-
-tc = TestCase(sys.argv[1], 'sh', 2, out[:-1], err[:-1])
-if p.returncode:
- tc.add_failure_info(err, "return: %d" % p.returncode)
-
-tss[0].test_cases.append(tc)
-
-with open('pjutest.dat', 'w') as dat:
- dump(tss, dat)
-
-with open('pjutest.xml', 'w') as xml:
- TestSuite.to_file(xml, tss, prettyprint=True)