Skip to content

Commit

Permalink
fbc-tests: update tests/Makefile and tests/log-tests.mk
Browse files Browse the repository at this point in the history
- Export FBC variable in Makefile so that calling tests/log-tests.mk and tests/unit-tests.mk gets the value used
- fix argument ordering on 'find' statements to avoid the positional warnings on gnu/find
  • Loading branch information
jayrm committed Jul 25, 2021
1 parent 6c8a2bc commit b33ce2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions tests/Makefile
Expand Up @@ -22,6 +22,7 @@ PRINTF := printf
ifndef FBC
FBC := fbc$(EXEEXT)
endif
export FBC

ENABLE_CHECK_BUGS :=
export ENABLE_CHECK_BUGS
Expand Down
14 changes: 7 additions & 7 deletions tests/log-tests.mk
Expand Up @@ -289,7 +289,7 @@ $(FAILED_LOG_TESTS_INC) :
@$(ECHO) "#" >> $(FAILED_LOG_TESTS_INC)

@$(PRINTF) "."
@$(FIND) $(DIRLIST) -type f -name -mindepth 1 '*.log' -mindepth 1 \
@$(FIND) $(DIRLIST) -mindepth 1 -type f -name '*.log' \
| $(XARGS) $(GREP) -l -i -E '^.*[[:space:]]*:[[:space:]]*RESULT=FAILED' \
| $(SED) -e 's/\(^.*\)[[:space:]]\:[[:space:]]TESTMODE=\(.*\)/SRCLIST_\2 \+\= \1/g' \
>> $(FAILED_LOG_TESTS_INC)
Expand All @@ -307,42 +307,42 @@ $(LOG_TESTS_INC) :
@$(ECHO) "#" >> $(LOG_TESTS_INC)

@$(PRINTF) "."
@$(FIND) $(DIRLIST) -type f -name '*.bas' -or -name '*.bmk' -mindepth 1 \
@$(FIND) $(DIRLIST) -mindepth 1 -type f -name '*.bas' -or -name '*.bmk' \
| $(XARGS) $(GREP) -l -i -E '[[:space:]]*.[[:space:]]*TEST_MODE[[:space:]]*\:[[:space:]]*COMPILE_ONLY_OK' \
| $(SED) -e 's/\(^.*\)/\SRCLIST_COMPILE_ONLY_OK \+\= \.\/\1/g' \
>> $(LOG_TESTS_INC)
@$(ECHO) "#" >> $(LOG_TESTS_INC)

@$(PRINTF) "."
@$(FIND) $(DIRLIST) -type f -name '*.bas' -or -name '*.bmk' -mindepth 1 \
@$(FIND) $(DIRLIST) -mindepth 1 -type f -name '*.bas' -or -name '*.bmk' \
| $(XARGS) $(GREP) -l -i -E '[[:space:]]*.[[:space:]]*TEST_MODE[[:space:]]*\:[[:space:]]*COMPILE_ONLY_FAIL' \
| $(SED) -e 's/\(^.*\)/\SRCLIST_COMPILE_ONLY_FAIL \+\= \.\/\1/g' \
>> $(LOG_TESTS_INC)
@$(ECHO) "#" >> $(LOG_TESTS_INC)

@$(PRINTF) "."
@$(FIND) $(DIRLIST) -type f -name '*.bas' -or -name '*.bmk' -mindepth 1 \
@$(FIND) $(DIRLIST) -mindepth 1 -type f -name '*.bas' -or -name '*.bmk' \
| $(XARGS) $(GREP) -l -i -E '[[:space:]]*.[[:space:]]*TEST_MODE[[:space:]]*\:[[:space:]]*COMPILE_AND_RUN_OK' \
| $(SED) -e 's/\(^.*\)/\SRCLIST_COMPILE_AND_RUN_OK \+\= \.\/\1/g' \
>> $(LOG_TESTS_INC)
@$(ECHO) "#" >> $(LOG_TESTS_INC)

@$(PRINTF) "."
@$(FIND) $(DIRLIST) -type f -name '*.bas' -or -name '*.bmk' -mindepth 1 \
@$(FIND) $(DIRLIST) -mindepth 1 -type f -name '*.bas' -or -name '*.bmk' \
| $(XARGS) $(GREP) -l -i -E '[[:space:]]*.[[:space:]]*TEST_MODE[[:space:]]*\:[[:space:]]*COMPILE_AND_RUN_FAIL' \
| $(SED) -e 's/\(^.*\)/\SRCLIST_COMPILE_AND_RUN_FAIL \+\= \.\/\1/g' \
>> $(LOG_TESTS_INC)
@$(ECHO) "#" >> $(LOG_TESTS_INC)

@$(PRINTF) "."
@$(FIND) $(DIRLIST) -type f -name '*.bmk' -mindepth 1 \
@$(FIND) $(DIRLIST) -mindepth 1 -type f -name '*.bmk' \
| $(XARGS) $(GREP) -l -i -E '[[:space:]]*.[[:space:]]*TEST_MODE[[:space:]]*\:[[:space:]]*MULTI_MODULE_OK' \
| $(SED) -e 's/\(^.*\)/\SRCLIST_MULTI_MODULE_OK \+\= \.\/\1/g' \
>> $(LOG_TESTS_INC)
@$(ECHO) "#" >> $(LOG_TESTS_INC)

@$(PRINTF) "."
@$(FIND) $(DIRLIST) -type f -name '*.bmk' -mindepth 1 \
@$(FIND) $(DIRLIST) -mindepth 1 -type f -name '*.bmk' \
| $(XARGS) $(GREP) -l -i -E '[[:space:]]*.[[:space:]]*TEST_MODE[[:space:]]*\:[[:space:]]*MULTI_MODULE_FAIL' \
| $(SED) -e 's/\(^.*\)/\SRCLIST_MULTI_MODULE_FAIL \+\= \.\/\1/g' \
>> $(LOG_TESTS_INC)
Expand Down

0 comments on commit b33ce2a

Please sign in to comment.