diff options
author | Martin Roth <martinroth@google.com> | 2015-10-21 14:50:00 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-10-24 10:55:45 +0200 |
commit | 0be83c09a066119f5fded3bd1344f90a0a98d52c (patch) | |
tree | 81c1e14b800ae80ed493b9fa523c6c3ad260a076 | |
parent | 535452d15462ed9126c67b63c08c12ee6e44f790 (diff) |
util: Update makefiles for junit testing
- Have clean remove junit.xml files.
- Remove junit.xml target from cbmem makefile - this is in the top
level Makefile.inc now.
- add distclean targets to makefiles.
- Make sure all makefiles have .PHONY set up.
- rm commands need -f or they will fail if the file they're trying
to remove doesn't exist, causing the build to fail.
Change-Id: I2f0635f2c0a9417e3377a90c8d67103323c4a72f
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12120
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r-- | util/cbmem/Makefile | 19 | ||||
-rw-r--r-- | util/ectool/Makefile | 6 | ||||
-rw-r--r-- | util/inteltool/Makefile | 2 | ||||
-rw-r--r-- | util/nvramtool/Makefile | 2 | ||||
-rw-r--r-- | util/superiotool/Makefile | 6 | ||||
-rw-r--r-- | util/viatool/Makefile | 1 |
6 files changed, 13 insertions, 23 deletions
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile index 91bb0456fb..41079b01bb 100644 --- a/util/cbmem/Makefile +++ b/util/cbmem/Makefile @@ -31,7 +31,7 @@ all: $(PROGRAM) $(PROGRAM): $(OBJS) clean: - rm -f $(PROGRAM) *.o *~ + rm -f $(PROGRAM) *.o *~ junit.xml distclean: clean rm -f .dependencies @@ -43,20 +43,3 @@ distclean: clean -include .dependencies -junit.xml: - echo '<?xml version="1.0" encoding="utf-8"?><testsuite>' > $@.tmp - $(MAKE) clean; \ - echo "<testcase classname='cbmem' name='cbmem'>" >> $@.tmp; \ - $(MAKE) >> $@.tmp.2 2>&1 && type="system-out" || type="failure"; \ - if [ $$type = "failure" ]; then \ - echo "<failure type='buildFailed'>" >> $@.tmp; \ - else \ - echo "<$$type>" >> $@.tmp; \ - fi; \ - echo '<![CDATA[' >> $@.tmp; \ - cat $@.tmp.2 >> $@.tmp; \ - echo "]]></$$type>" >>$@.tmp; \ - rm -f $@.tmp.2; \ - echo "</testcase>" >> $@.tmp; \ - echo "</testsuite>" >> $@.tmp - mv $@.tmp $@ diff --git a/util/ectool/Makefile b/util/ectool/Makefile index 3ab0bc8638..6225503fda 100644 --- a/util/ectool/Makefile +++ b/util/ectool/Makefile @@ -38,7 +38,11 @@ install: $(PROGRAM) $(INSTALL) $(PROGRAM) $(PREFIX)/sbin clean: - rm *.o $(PROGRAM) + rm -f *.o $(PROGRAM) junit.xml + +distclean: clean %.o: %.c $(CC) $(CFLAGS) -c $^ -I. -o $@ + +.PHONY: all install clean distclean diff --git a/util/inteltool/Makefile b/util/inteltool/Makefile index d5fb1da975..3fbcf9c203 100644 --- a/util/inteltool/Makefile +++ b/util/inteltool/Makefile @@ -45,7 +45,7 @@ $(PROGRAM): $(OBJS) $(CC) $(CFLAGS) -o $(PROGRAM) $(OBJS) $(LDFLAGS) clean: - rm -f $(PROGRAM) *.o *~ + rm -f $(PROGRAM) *.o *~ junit.xml distclean: clean rm -f .dependencies diff --git a/util/nvramtool/Makefile b/util/nvramtool/Makefile index 1f197334f1..7df3aa32dc 100644 --- a/util/nvramtool/Makefile +++ b/util/nvramtool/Makefile @@ -54,7 +54,7 @@ $(PROGRAM): $(OBJS) $(STRIP) $(STRIP_ARGS) $(PROGRAM) clean: - rm -f $(PROGRAM) $(OBJS) + rm -f $(PROGRAM) $(OBJS) junit.xml distclean: clean rm -f .dependencies diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile index b005a3fca7..0736713b09 100644 --- a/util/superiotool/Makefile +++ b/util/superiotool/Makefile @@ -73,6 +73,8 @@ install: $(PROGRAM) $(INSTALL) -p -m644 $(PROGRAM).8 $(DESTDIR)$(PREFIX)/share/man/man8 clean: - rm -f $(PROGRAM) *.o + rm -f $(PROGRAM) *.o junit.xml -.PHONY: all install clean +distclean: clean + +.PHONY: all install clean distclean diff --git a/util/viatool/Makefile b/util/viatool/Makefile index 1658557529..f1ac3a0e6c 100644 --- a/util/viatool/Makefile +++ b/util/viatool/Makefile @@ -55,6 +55,7 @@ clean: rm -f $(PROGRAM) $(OBJS) # Remove backup files created by some editors find ./ |grep *~ |xargs rm -f + rm -f junit.xml distclean: clean rm -f .dependencies |