OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [scripts/] [make/] [Makefile-rtltestrules.inc] - Blame information for rev 570

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 542 julius
# RTL test rules
2
 
3
 
4
print-tests:
5
        @echo; echo; echo "\t### Software tests to be run ###"; echo;
6
        @echo $(TESTS)
7
        @echo
8
 
9
 
10
# Suffix of file to check after each test for the string
11
TEST_OUT_FILE_SUFFIX=-general.log
12
TEST_OK_STRING=8000000d
13
 
14
.PHONY: rtl-test
15
rtl-test: clean-sim-test-sw sw clean-test-defines $(TEST_DEFINES_VLG) \
16
        $(SIMULATOR)
17
 
18
# Run an RTL test followed by checking of generated results
19
rtl-test-with-check: rtl-test
20
        $(Q)$(MAKE) check-test-log; \
21
        if [ $$? -ne 0 ]; then \
22
                echo; echo "\t### "$(TEST)" test FAIL ###"; echo; \
23
        else \
24
                echo; echo "\t### "$(TEST)" test OK ###"; echo; \
25
        fi
26
 
27
# Do check, don't print anything out
28
rtl-test-with-check-no-print: rtl-test check-test-log
29
 
30
# Main RTL test loop
31
rtl-tests:
32
        $(Q)for test in $(TESTS); do \
33
                export TEST=$$test; \
34
                $(MAKE) rtl-test-with-check-no-print; \
35
                if [ $$? -ne 0 ]; then break; fi; \
36
                echo; echo "\t### $$test test OK ###"; echo; \
37
        done
38
 
39
 
40
.PHONY: check-test-log
41
check-test-log:
42
        $(Q)echo "#!/bin/bash" > $@
43
        $(Q)echo "function check-test-log { if [ \`grep -c -i "$(TEST_OK_STRING)" "$(RTL_SIM_RESULTS_DIR)"/"$(TEST)$(TEST_OUT_FILE_SUFFIX)"\` -gt 0 ]; then return 0; else return 1; fi; }" >> $@
44
        $(Q)echo "check-test-log" >> $@
45
        $(Q)chmod +x $@
46
        $(Q) echo; echo "\t### Checking simulation results for "$(TEST)" test ###"; echo;
47
        $(Q)./$@

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.