CI: rework tools compile test
This commit is contained in:
parent
24aa8fd8f8
commit
d49f0c6980
@ -25,47 +25,30 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
|
|
||||||
TOOLS=sky tools
|
TOOLS= tools sky
|
||||||
FAILTOOLS=sky=uip6-bridge
|
|
||||||
|
|
||||||
|
|
||||||
TOOLSDIR=../../tools
|
TOOLSDIR=../../tools
|
||||||
LOGS=$(patsubst %,%.log, $(TOOLS))
|
TESTLOGS=$(patsubst %,%.testlog, $(TOOLS))
|
||||||
|
|
||||||
all: summary
|
all: summary
|
||||||
|
|
||||||
FRC:
|
tools.testlog:
|
||||||
|
@echo -n Building tool: $(basename $@)
|
||||||
|
@printf "%-32s" "$@" > $@
|
||||||
|
@$(MAKE) -C $(TOOLSDIR) > /dev/null && \
|
||||||
|
(echo " -> OK" && echo "TEST OK" >> $@) || \
|
||||||
|
(echo " -> FAIL" && echo "TEST FAIL" >> $@)
|
||||||
|
|
||||||
|
%.testlog:
|
||||||
|
@echo -n Building tool: $(basename $@)
|
||||||
|
@printf "%-32s" "$@" > $@
|
||||||
|
@$(MAKE) -C $(TOOLSDIR)/$(basename $@) > /dev/null && \
|
||||||
|
(echo " -> OK" && echo "TEST OK" >> $@) || \
|
||||||
|
(echo " -> FAIL" && echo "TEST FAIL" >> $@)
|
||||||
|
|
||||||
sky.log: RMFILES=serialdump-linux
|
summary: $(TESTLOGS)
|
||||||
|
@cat *.testlog > summary
|
||||||
|
@echo "========== Summary =========="
|
||||||
tools.log:
|
@cat summary
|
||||||
@$(MAKE) -C $(TOOLSDIR) > $@ 2>&1 && $(RM) $@.failed || touch $@.failed
|
|
||||||
|
|
||||||
|
|
||||||
%.log: FRC
|
|
||||||
@( cd $(TOOLSDIR)/$(subst =,/,$*) && $(RM) $(RMFILES) )
|
|
||||||
@touch $@
|
|
||||||
@$(MAKE) -C $(TOOLSDIR)/$(subst =,/,$*) > $@ 2>&1 && $(RM) $@.failed || touch $@.failed
|
|
||||||
|
|
||||||
|
|
||||||
summary: $(LOGS)
|
|
||||||
@(\
|
|
||||||
for T in $(TOOLS) ; do \
|
|
||||||
if [ -f $$T.log.failed ] ; then \
|
|
||||||
echo tools/$$T: FAIL >> $@;\
|
|
||||||
cat $$T.log >> $@;\
|
|
||||||
else \
|
|
||||||
echo tools/$$T: OK >> $@;\
|
|
||||||
fi\
|
|
||||||
done \
|
|
||||||
)
|
|
||||||
@echo "Info: The following tools need fixing and are not tested:" $(subst =,/,$(FAILTOOLS)) >> $@
|
|
||||||
@echo $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@make -C $(DOCDIR) clean
|
@rm -f *.testlog summary
|
||||||
|
|
||||||
|
|
||||||
.PHONY: %.log
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
|
|
||||||
all: summary
|
all: clean summary
|
||||||
|
|
||||||
build: examples tools
|
build: examples tools
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user