another microbench
[mono.git] / mono / benchmark / Makefile.am
1 TEST_PROG=../mini/mono
2 RUNTIME_ARGS="-O=all"
3
4 CSC=mcs
5
6
7 TESTSRC=                        \
8         fib.cs                  \
9         life.cs                 \
10         castclass.cs            \
11         isinst.cs               \
12         inline1.cs              \
13         inline2.cs              \
14         inline3.cs              \
15         inline4.cs              \
16         inline5.cs              \
17         inline6.cs              \
18         muldiv.cs               \
19         loops.cs                \
20         initlocals.cs           \
21         logic.cs                \
22         switch.cs               \
23         ctor-bench.cs           \
24         readonly.cs             \
25         bulkcpy.il              \
26         math.cs                 \
27         boxtest.cs
28
29 TESTSI_TMP=$(TESTSRC:.cs=.exe)
30 TESTSI=$(TESTSI_TMP:.il=.exe)
31
32 EXTRA_DIST=test-driver $(TESTSRC)
33
34 %.exe: %.il
35         ilasm $< /OUTPUT=$@
36
37 %.exe: %.cs
38         $(CSC) $<
39
40 test: $(TEST_PROG) $(TESTSI)
41         @failed=0; \
42         passed=0; \
43         for i in $(TESTSI); do  \
44                 if ./test-driver $(TEST_PROG) $$i $(RUNTIME_ARGS); \
45                 then \
46                         passed=`expr $${passed} + 1`; \
47                 else \
48                         failed=`expr $${failed} + 1`; \
49                 fi \
50         done; \
51         echo "$${passed} test(s) passed. $${failed} test(s) failed."
52
53 check:
54         @echo no check yet