aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/test-qapi.py
diff options
context:
space:
mode:
authorLluís Vilanova <vilanova@ac.upc.edu>2014-05-02 15:52:35 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-05-08 14:19:58 -0400
commit33aaad529e7391a9ddc73682415e900950553200 (patch)
tree0848f68d63660ab71bd32a28e7ef915f1a98c85d /tests/qapi-schema/test-qapi.py
parent98c1200af149b5aa6d63d5aad5354fd5d888a8bf (diff)
qapi: Use an explicit input file
Use an explicit input file on the command-line instead of reading from standard input. It also outputs the proper file name when there's an error. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'tests/qapi-schema/test-qapi.py')
-rw-r--r--tests/qapi-schema/test-qapi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index 5a26ef3aa3..634ef2d00a 100644
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -12,10 +12,11 @@
from qapi import *
from pprint import pprint
+import os
import sys
try:
- exprs = parse_schema(sys.stdin)
+ exprs = parse_schema(sys.argv[1])
except SystemExit:
raise