summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@mozilla.com>2015-12-28 23:37:49 -0800
committerRalph Giles <giles@mozilla.com>2016-01-04 10:18:20 -0800
commitcf902dbb1a0561283b9cc8558f83074a647c00d8 (patch)
tree1d739900330ee6a70e86f1c5bf57c2ae581fe3fc
parent36d362287546323cabb42d745a4c9bd570c5d3b5 (diff)
downloadopus-cf902dbb1a0561283b9cc8558f83074a647c00d8.tar.gz
Add a check target to the static makefiles. r=ron
-rw-r--r--Makefile.mips9
-rw-r--r--Makefile.unix9
2 files changed, 14 insertions, 4 deletions
diff --git a/Makefile.mips b/Makefile.mips
index 7a357eab..56a50623 100644
--- a/Makefile.mips
+++ b/Makefile.mips
@@ -108,11 +108,16 @@ TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C))
OPUSCOMPARE_SRCS_C = src/opus_compare.c
OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C))
+TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding
+
# Rules
-all: lib opus_demo opus_compare test_opus_api test_opus_decode test_opus_encode test_opus_padding
+all: lib opus_demo opus_compare $(TESTS)
lib: $(TARGET)
+check: all
+ for test in $(TESTS); do ./$$test; done
+
$(TARGET): $(OBJS)
$(ARCHIVE.cmdline)
@@ -153,4 +158,4 @@ clean:
$(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \
$(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS)
-.PHONY: all lib clean force
+.PHONY: all lib clean force check
diff --git a/Makefile.unix b/Makefile.unix
index 04f10194..b13230e8 100644
--- a/Makefile.unix
+++ b/Makefile.unix
@@ -106,11 +106,16 @@ TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C))
OPUSCOMPARE_SRCS_C = src/opus_compare.c
OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C))
+TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding
+
# Rules
-all: lib opus_demo opus_compare test_opus_api test_opus_decode test_opus_encode test_opus_padding
+all: lib opus_demo opus_compare $(TESTS)
lib: $(TARGET)
+check: all
+ for test in $(TESTS); do ./$$test; done
+
$(TARGET): $(OBJS)
$(ARCHIVE.cmdline)
@@ -151,4 +156,4 @@ clean:
$(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \
$(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS)
-.PHONY: all lib clean force
+.PHONY: all lib clean force check