Commit d24ecca0 authored by Daniel Tuulik's avatar Daniel Tuulik
Browse files

Add QGen tests using ASN1SCC types to OG regression suite

The usual test is now using ASN1SCC generated data types
Added -gt tests that use QGen generated data types
parent 77253e75
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
$(OPENGEODE) og.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview-uniq.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: flight.ali
test-c: flight.c
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: dataview-uniq.o test_ada.o
$(OPENGEODE) og.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview-uniq.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
$(OPENGEODE) og.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
$(OPENGEODE) test.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
$(OPENGEODE) test.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
mono $(ASN1SCC) -c -typePrefix asn1Scc -equal dataview-uniq.asn
$(CC) -c -g test_ada.c
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
$(OPENGEODE) og.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview-uniq.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
$(OPENGEODE) test.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: dataview-uniq.o | test_ada.o
$(OPENGEODE) og.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview-uniq.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: myfunction.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n myfunction.ali
$(GNATLINK) -o test_ada test_ada.o myfunction.ali -lgnat
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
$(OPENGEODE) og.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview.asn
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
@echo 'Nothing to test - test-parse must retun errors'
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: function1.ali
test-c: function1.c
......
......@@ -18,6 +18,8 @@ testsWork = {
'test-qgen-parse' : work1,
'test-qgen-ada' : work1,
'test-qgen-c' : work1,
'test-qgen-gt-ada' : work1,
'test-qgen-gt-c' : work1,
'test-ada' : work1,
'test-c' : work1,
'test-llvm' : work1,
......@@ -37,7 +39,7 @@ def parse_args():
parser.add_argument('paths', metavar='Path', type=str, nargs='+')
parser.add_argument('-u', '--update', action='store_true')
return parser.parse_args()
def main():
''' Run the test cases in parallel on all available CPUs '''
start = time.time()
......@@ -57,19 +59,19 @@ def main():
def make(rule, path):
''' Call a Makefile with the required rule (e.g. test-ada or clean) '''
''' Choose work settings based on the given rule '''
work=testsWork[rule]
''' Compose the command based on the rule'''
cmd=[work[0], work[1], path, rule]
proc = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
stdout, stderr = proc.communicate()
errcode = proc.wait()
......
......@@ -17,6 +17,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: og.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n og.ali
$(GNATLINK) -o test_ada test_ada.o dataview-uniq.o og.ali -lgnat
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: challenge.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n challenge.ali
$(GNATLINK) -o test_ada test_ada.o challenge.ali -lgnat -lm
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: og.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n og.ali
$(GNATLINK) -o test_ada test_ada.o og.ali -lgnat
......
......@@ -19,6 +19,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: trafficlight.ali
test-c: trafficlight.c
......
......@@ -17,6 +17,12 @@ test-qgen-ada:
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: orchestrator.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n orchestrator.ali
$(GNATLINK) -o test_ada test_ada.o orchestrator.ali -lgnat
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment