Skip to content

Commit

Permalink
remove test report to facilitate ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
jjts committed Oct 3, 2021
1 parent 103824d commit 738e71f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#TOP
test_report.log
#nothing to ignore

#SOFTWARE
software/periphs.h
Expand Down
19 changes: 4 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,14 @@ doc-clean:
#

test:
@echo TEST REPORT `date`> test_report.log;\
make test-pc-emul;\
make test-all-simulators;\
make test-all-boards;\
make test-all-docs;\
echo TEST FINISHED `date`>> test_report.log

test-pc-emul:
@make -C $(PC_DIR) all TEST_LOG="> test.log";\
if [ "`diff -q $(PC_DIR)/test.log $(PC_DIR)/test.expected`" ]; then \
echo PC EMULATION TEST FAILED; else \
echo PC EMULATION TEST PASSED; fi >> test_report.log

diff -q $(PC_DIR)/test.log $(PC_DIR)/test.expected

test-simulator:
@make -C $(SIM_DIR) clean-testlog;\
Expand All @@ -84,9 +79,7 @@ test-simulator:
make -C $(SIM_DIR) all INIT_MEM=1 USE_DDR=1 RUN_EXTMEM=0 TEST_LOG=">> test.log";\
make -C $(SIM_DIR) all INIT_MEM=1 USE_DDR=1 RUN_EXTMEM=1 TEST_LOG=">> test.log";\
make -C $(SIM_DIR) all INIT_MEM=0 USE_DDR=1 RUN_EXTMEM=1 TEST_LOG=">> test.log";\
if [ "`diff -q $(SIM_DIR)/test.log $(SIM_DIR)/test.expected`" ]; then \
echo SIMULATOR $(SIMULATOR) TEST FAILED; else \
echo SIMULATOR $(SIMULATOR) TEST PASSED; fi >> test_report.log
diff -q $(SIM_DIR)/test.log $(SIM_DIR)/test.expected

test-all-simulators:
$(foreach s, $(SIM_LIST), make test-simulator SIMULATOR=$s;)
Expand All @@ -101,9 +94,7 @@ test-board:
make -C $(BOARD_DIR) all INIT_MEM=0 USE_DDR=0 RUN_EXTMEM=0 TEST_LOG=">> test.log";\
make -C $(BOARD_DIR) clean;\
make -C $(BOARD_DIR) all INIT_MEM=0 USE_DDR=1 RUN_EXTMEM=1 TEST_LOG=">> test.log";\
if [ "`diff -q $(CONSOLE_DIR)/test.log $(BOARD_DIR)/test.expected`" ]; then \
echo BOARD $(BOARD) TEST FAILED; else \
echo BOARD $(BOARD) TEST PASSED; fi >> test_report.log
diff -q $(CONSOLE_DIR)/test.log $(BOARD_DIR)/test.expected

test-all-boards:
$(foreach b, $(BOARD_LIST), make test-board BOARD=$b;)
Expand All @@ -114,9 +105,7 @@ clean-all-boards:
test-doc:
@make -C $(DOC_DIR) clean;\
make -C $(DOC_DIR) all DOC=$(DOC);\
if [ "`diff -q $(DOC_DIR)/$(DOC).aux $(DOC_DIR)/$(DOC).expected`" ]; then \
echo DOC $(DOC) TEST FAILED; else \
echo DOC $(DOC) TEST PASSED; fi >> test_report.log
diff -q $(DOC_DIR)/$(DOC).aux $(DOC_DIR)/$(DOC).expected

test-all-docs:
$(foreach b, $(DOC_LIST), make test-doc DOC=$b;)
Expand Down
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ make test-simulator [SIMULATOR=<simulator directory name>]

The above command creates a file called `test.log` in directory
`hardware/simulation/<simulator directory name>`, which is compared to file
`test.expected`in the same directory; if they differ, an error is issued. It
also adds a line to file `test_report.log` in the repository's root directory.
`test.expected`in the same directory; if they differ, the test is aborted.

To run the series of simulation tests on all the simulators listed in the
SIM\_LIST variable, type:
Expand Down Expand Up @@ -243,8 +242,7 @@ make test-board [BOARD=<board directory name>]

The above command creates the file `software/console/test.log`, which is
compared to file `hardware/fpga/<FPGA compiler name>/<board directory
name>/test.expected`; if they differ, an error is issued. It also adds a line to
file `test_report.log` in the repository's root directory.
name>/test.expected`; if they differ, the test is aborted.

To run the series of board tests on all the boards listed in the BOARD\_LIST
variable, type:
Expand All @@ -267,10 +265,6 @@ To compile and test the document given in the DOC, variable, type:
make test-doc [DOC=<document directory name>]
```

The above command will add a line to file `test_report.log` in the repository's
root directory.


To test all documents listed in the DOC\_LIST variable, type:

```
Expand All @@ -289,10 +283,6 @@ To run all simulation, FPGA board and documentation tests, type:
make test
```

The total test report can be found in file `test_report.log` in the repository's
root directory.


## Cleaning

The following command will clean the selected directories for simulation and
Expand Down
2 changes: 1 addition & 1 deletion system.mk
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,6 @@ $(foreach p, $(PERIPHERALS), $(eval DEFINE+=$(defmacro)$p=$($p)))

#RULES
gen-clean:
@rm -f *# *~ test_report.log
@rm -f *# *~

.PHONY: gen-clean

0 comments on commit 738e71f

Please sign in to comment.