File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
+ import os
17
18
import sys
18
19
import subprocess
19
20
@@ -31,6 +32,7 @@ def main():
31
32
tempfile = sys .argv [2 ]
32
33
cmd = sys .argv [3 :]
33
34
returncode = 0
35
+ all_modules = open (infile ).read ()
34
36
for i , (module , asserts ) in enumerate (support .split_wast (infile )):
35
37
tempname = tempfile + '.' + str (i )
36
38
with open (tempname , 'w' ) as temp :
@@ -39,6 +41,9 @@ def main():
39
41
result = subprocess .run (new_cmd )
40
42
if result .returncode != 0 :
41
43
returncode = result .returncode
44
+ module_char_start = all_modules .find (module )
45
+ module_line_start = all_modules [:module_char_start ].count (os .linesep )
46
+ print (f'[Failing module at line { module_line_start } ]' , file = sys .stderr )
42
47
sys .exit (returncode )
43
48
44
49
You can’t perform that action at this time.
0 commit comments