File tree Expand file tree Collapse file tree 2 files changed +8
-23
lines changed Expand file tree Collapse file tree 2 files changed +8
-23
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,12 @@ def __init__(self, program):
53
53
def find_main (self ):
54
54
mtds = []
55
55
for c in self .clss :
56
- mtds = utils .extract_nodes ([MethodDeclaration , ConstructorDeclaration ], c )
57
- mtds = filter (lambda m : td .isStatic (m ) and m .name == u'main' , mtds )
58
- lenn = len (mtds )
59
- if lenn > 1 :
60
- raise Exception ("multiple main()s" , mtds )
61
- return mtds [0 ] if lenn == 1 else None
56
+ m = utils .extract_nodes ([MethodDeclaration , ConstructorDeclaration ], c )
57
+ mtds . extend ( filter (lambda m : td .isStatic (m ) and m .name == u'main' , m ) )
58
+ lenn = len (mtds )
59
+ if lenn > 1 :
60
+ raise Exception ("multiple main()s" , map ( lambda m : m . parentNode . name , mtds ) )
61
+ return mtds [0 ] if lenn == 1 else None
62
62
63
63
def find_harness (self ):
64
64
# TODO: these can also be specified with annotations -- we don't support those yet
@@ -74,7 +74,7 @@ def main_cls(self):
74
74
harness = self .prg .gsymtab [harness .atr ] if harness else None
75
75
if main : return main
76
76
elif harness : return harness
77
- else : raise Exception ("No main(), @Harness, or harness found" )
77
+ else : raise Exception ("No main(), @Harness, or harness found, None " )
78
78
79
79
def to_sk (self ):
80
80
# clean up result directory
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- if [[ $1 == " -test" ]]
4
- then
5
- wd=` pwd`
6
- if [ ! -d $wd /tmp ]; then mkdir -p $wd /tmp
7
- else rm $wd /tmp/*
8
- fi
9
-
10
- shift
11
- in=$1
12
- shift
13
- python -m java_sk.main -o result/tmp $wd /$in
14
-
15
- diff -Bwr result/tmp results/output
16
- else
17
- python -m java_sk.main -o result $@
18
- fi
3
+ python -m java_sk.main -o result $@
You can’t perform that action at this time.
0 commit comments