Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
b78ee031
Commit
b78ee031
authored
Mar 08, 2015
by
Michael Arntzenius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make tester produce useful help messages
parent
4480e933
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
26 deletions
+34
-26
Makefile
Makefile
+2
-2
tools/tester.py
tools/tester.py
+32
-24
No files found.
Makefile
View file @
b78ee031
...
...
@@ -835,8 +835,8 @@ $(eval \
.PHONY
:
test$1 check$1
check$1 test$1
:
$(PYTHON_EXE_DEPS) pyston$1 ext_pyston
$(PYTHON)
$(TOOLS_DIR)
/tester.py
-R
pyston
$1
-j
$(TEST_THREADS)
-k
$(TESTS_DIR)
$(ARGS)
$(PYTHON)
$(TOOLS_DIR)
/tester.py
-a
-x
-R
pyston
$1
-j
$(TEST_THREADS)
-a
-n
-k
$(TESTS_DIR)
$(ARGS)
$(PYTHON)
$(TOOLS_DIR)
/tester.py
-R
pyston
$1
-j
$(TEST_THREADS)
-a
-O
-k
$(TESTS_DIR)
$(ARGS)
$(PYTHON)
$(TOOLS_DIR)
/tester.py
-a
=
-x
-R
pyston
$1
-j
$(TEST_THREADS)
-a
=
-n
-k
$(TESTS_DIR)
$(ARGS)
$(PYTHON)
$(TOOLS_DIR)
/tester.py
-R
pyston
$1
-j
$(TEST_THREADS)
-a
=
-O
-k
$(TESTS_DIR)
$(ARGS)
.PHONY
:
run$1 dbg$1
run$1
:
pyston$1 $$(RUN_DEPS)
...
...
tools/tester.py
View file @
b78ee031
...
...
@@ -14,13 +14,13 @@
#!/usr/bin/env python
import
Queue
import
argparse
import
cPickle
import
datetime
import
functools
import
getopt
import
glob
import
os
import
Queue
import
re
import
resource
import
signal
...
...
@@ -366,34 +366,42 @@ def fileSize(fn):
return os.stat(fn).st_size
# return len(list(open(fn)))
# our arguments
parser = argparse.ArgumentParser(description='Runs Pyston tests.')
parser.add_argument('-m', '--run-memcheck', action='store_true', help='run memcheck')
parser.add_argument('-j', '--num-threads', metavar='N', type=int, default=NUM_THREADS,
help='number of threads')
parser.add_argument('-k', '--keep-going', default=KEEP_GOING, action='store_true',
help='keep going after test failure')
parser.add_argument('-R', '--image', default=IMAGE,
help='the executable to test (default: %s)' % IMAGE)
parser.add_argument('-K', '--no-keep-going', dest='keep_going', action='store_false',
help='quit after test failure')
parser.add_argument('-a', '--extra-args', default=[], action='append',
help="additional arguments to pyston (must be invoked with equal sign: -a=-ARG)")
parser.add_argument('-t', '--time-limit', type=int, default=TIME_LIMIT,
help='set time limit in seconds for each test')
parser.add_argument('test_dir')
parser.add_argument('patterns', nargs='*')
if __name__ == "__main__":
run_memcheck = False
start = 1
opts, patterns = getopt.gnu_getopt(sys.argv[1:], "j:a:t:mR:kK")
for (t, v) in opts:
if t == '-m':
run_memcheck = True
elif t == '-j':
NUM_THREADS = int(v)
assert NUM_THREADS > 0
elif t == '-R':
IMAGE = v
elif t == '-k':
KEEP_GOING = True
elif t == '-K':
KEEP_GOING = False
elif t == '-a':
EXTRA_JIT_ARGS.append(v)
elif t == '-t':
TIME_LIMIT = int(v)
else:
raise Exception((t, v))
opts = parser.parse_args()
print opts
run_memcheck = opts.run_memcheck
NUM_THREADS = opts.num_threads
IMAGE = opts.image
KEEP_GOING = opts.keep_going
EXTRA_JIT_ARGS += opts.extra_args
TIME_LIMIT = opts.time_limit
TEST_DIR =
patterns[0]
assert os.path.isdir(TEST_DIR), "%s doesn't look like a directory with tests in it" % TEST_DIR
TEST_DIR =
opts.test_dir
patterns = opts.patterns
patterns = patterns[1:]
assert os.path.isdir(TEST_DIR), "%s doesn't look like a directory with tests in it" % TEST_DIR
TOSKIP = ["%s/%s.py" % (TEST_DIR, i) for i in (
"tuple_depth",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment