ref: cf902dbb1a0561283b9cc8558f83074a647c00d8
parent: 36d362287546323cabb42d745a4c9bd570c5d3b5
author: Ralph Giles <[email protected]>
date: Mon Dec 28 18:37:49 EST 2015
Add a check target to the static makefiles. r=ron
--- a/Makefile.mips
+++ b/Makefile.mips
@@ -108,11 +108,16 @@
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 @@
$(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \
$(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS)
-.PHONY: all lib clean force
+.PHONY: all lib clean force check
--- a/Makefile.unix
+++ b/Makefile.unix
@@ -106,11 +106,16 @@
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 @@
$(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \
$(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS)
-.PHONY: all lib clean force
+.PHONY: all lib clean force check