Commit aeb3a618 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Merge branch 'llvm' of https://github.com/dbrabera/opengeode

parents ea3aad83 9b2eea26
all: test-ada
all: test-ada test-llvm
test-parse:
../../../opengeode.py og.pr system_structure.pr --check
......@@ -7,13 +7,23 @@ test-ada:
../../../opengeode.py --toAda og.pr system_structure.pr
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c *.adb
gcc -c test.c
gcc -c test_ada.c
gnatbind -n og.ali
gnatlink -o testcase test.o og.ali -lgnat
gnatlink -o testcase test_ada.o og.ali -lgnat
./testcase | diff expected -
test-llvm:
../../../opengeode.py og.pr system_structure.pr --llvm
llc og.ll
gcc -c og.s
gcc -c test_llvm.c
gcc og.o test_llvm.o -o testcase
./testcase | diff expected -
coverage:
coverage run -p ../../../opengeode.py og.pr system_structure.pr --toAda
clean:
rm -rf result *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr testcase
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s
#include <math.h>
#include <stdio.h>
extern void adainit();
int main()
{
printf("[C Code] Running test\n");
int main() {
adainit();
return 0;
}
extern void og_startup();
int main() {
og_startup();
return 0;
}
\ No newline at end of file
all: test-ada
all: test-ada test-llvm
edit:
../../../opengeode.py trafficlight.pr system_structure.pr
......@@ -14,6 +14,11 @@ test-ada:
#gnatbind -n trafficlight.ali
#gnatlink -o testcase test.o trafficlight.ali -lgnat -lm
test-llvm:
../../../opengeode.py trafficlight.pr system_structure.pr --llvm
llc trafficlight.ll
gcc -c trafficlight.s
test-export:
../../../opengeode.py --png --pdf --svg trafficlight.pr system_structure.pr
../../../opengeode.py --png --pdf --svg --split trafficlight.pr system_structure.pr
......@@ -22,4 +27,5 @@ coverage:
coverage run -p ../../../opengeode.py trafficlight.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr *.pdf *.svg *.png test
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s *.pdf *.svg *.png
all: test-ada
all: test-ada test-llvm
test-parse:
../../../opengeode.py orchestrator.pr system_structure.pr --check
......@@ -8,8 +8,14 @@ test-ada:
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c orchestrator.adb
test-llvm:
../../../opengeode.py orchestrator.pr system_structure.pr --llvm
llc orchestrator.ll
gcc -c orchestrator.s
coverage:
coverage run -p ../../../opengeode.py orchestrator.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s
all: test-ada
all: test-ada test-llvm
test-parse:
../../../opengeode.py fce.pr system_structure.pr --check
......@@ -8,8 +8,14 @@ test-ada:
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c fce.adb
test-llvm:
../../../opengeode.py fce.pr system_structure.pr --llvm
llc fce.ll
gcc -c fce.s
coverage:
coverage run -p ../../../opengeode.py fce.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s
all: test-ada
all: test-ada test-llvm
edit:
../../../opengeode.py orchestrator.pr system_structure.pr
......@@ -11,8 +11,14 @@ test-ada:
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c orchestrator.adb
test-llvm:
../../../opengeode.py orchestrator.pr system_structure.pr --llvm
llc orchestrator.ll
gcc -c orchestrator.s
coverage:
coverage run -p ../../../opengeode.py orchestrator.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s
all: test-ada
all: test-ada test-llvm
test-parse:
../../../opengeode.py function0.pr system_structure.pr --check
......@@ -8,8 +8,14 @@ test-ada:
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c function0.adb
test-llvm:
../../../opengeode.py function0.pr system_structure.pr --llvm
llc function0.ll
gcc -c function0.s
coverage:
coverage run -p ../../../opengeode.py function0.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s
all: test-ada
all: test-ada test-llvm
test-parse:
../../../opengeode.py myfunction.pr system_structure.pr --check
......@@ -8,15 +8,24 @@ test-ada:
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc
gnatmake -c myfunction.adb
gcc -c test.c
gcc -c test_ada.c
gnatbind -n myfunction.ali
gnatlink -o testcase test.o myfunction.ali -lgnat
gnatlink -o testcase test_ada.o myfunction.ali -lgnat
./testcase | diff expected -
test-llvm:
../../../opengeode.py myfunction.pr system_structure.pr --check --llvm
asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc -equal
llc myfunction.ll
clang -c myfunction.s
clang -c dataview-uniq.c
clang -c test_llvm.c
clang myfunction.o dataview-uniq.o test_llvm.o -o testcase
./testcase | diff expected -
coverage:
coverage run -p ../../../opengeode.py myfunction.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr datav*.? ber.c xer.c asn1crt.? acn.c real.c testcase
bin *.wrn *.gpr datav*.? ber.c xer.c asn1crt.? acn.c real.c testcase *.ll *.s
#include <math.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include "dataview-uniq.h"
extern void myfunction_startup();
extern void myfunction_start_something(asn1SccT_Int32 *);
extern void myfunction_mytimer();
volatile sig_atomic_t keep_going = 1;
void myfunction_RI_result_data(long long *val)
{
printf("[C] result_data: %lld\n", *val);
}
void myfunction_RI_set_mytimer(asn1SccT_Int32 *val)
{
printf("[C] SET MyTimer: %lld\n", *val);
alarm(((int)*val) / 1000);
}
void timer_expired()
{
myfunction_mytimer();
keep_going = 0;
}
void myfunction_RI_reset_mytimer()
{
printf("RESET MyTimer\n");
}
int main()
{
asn1SccT_Int32 test = 5;
signal(SIGALRM, timer_expired);
printf("[C Code] Running test\n");
myfunction_startup();
myfunction_start_something(&test);
while (keep_going);
return 0;
}
all: test-ada
all: test-ada test-llvm
edit:
../../../opengeode.py orchestrator.pr system_structure.pr
......@@ -11,8 +11,14 @@ test-ada:
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c orchestrator.adb
test-llvm:
../../../opengeode.py orchestrator.pr system_structure.pr --llvm
llc orchestrator.ll
gcc -c orchestrator.s
coverage:
coverage run -p ../../../opengeode.py orchestrator.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s
all: test-ada
all: test-ada test-llvm
edit:
../../../opengeode.py orchestrator.pr system_structure.pr
......@@ -11,9 +11,19 @@ test-ada:
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc
gnatmake -c *.adb
gcc -c test.c
gcc -c test_ada.c
gnatbind -n orchestrator.ali
gnatlink -o testcase test.o orchestrator.ali -lgnat
gnatlink -o testcase test_ada.o orchestrator.ali -lgnat
./testcase | diff expected -
test-llvm:
../../../opengeode.py orchestrator.pr system_structure.pr --check --llvm
asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc -equal
llc orchestrator.ll
clang -c orchestrator.s
clang -c dataview-uniq.c
clang -c test_llvm.c
clang orchestrator.o dataview-uniq.o test_llvm.o -o testcase -lm
./testcase | diff expected -
coverage:
......@@ -21,4 +31,4 @@ coverage:
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr datav*.? ber.c xer.c asn1crt.? acn.c real.c testcase
bin *.wrn *.gpr datav*.? ber.c xer.c asn1crt.? acn.c real.c *.wrn *.gpr testcase *.ll *.s
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
extern void orchestrator_startup();
void orchestrator_RI_VESAT_one_step(asn1SccT_GNC_LV_SIM_INPUTS *inp)
{
printf("[C Code] Received T_GNC_LV_SIM_INPUTS\n");
}
int main()
{
printf("[C Code] Running test\n");
orchestrator_startup();
return 0;
}
\ No newline at end of file
all: test-ada
all: test-ada test-llvm
edit:
../../../opengeode.py challenge.pr system_structure.pr
......@@ -11,8 +11,14 @@ test-ada:
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c challenge.adb
test-llvm:
../../../opengeode.py challenge.pr system_structure.pr --llvm
llc challenge.ll
gcc -c challenge.s
coverage:
coverage run -p ../../../opengeode.py challenge.pr system_structure.pr --toAda
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner bin *.wrn *.gpr
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s
......@@ -21,6 +21,7 @@ paths = [
'regression/test12',
'regression/test-substrings',
'regression/test-expressions',
'regression/test-controlflow',
]
......
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