From 9088f1e20c0bab65b0ce780511bfdf432c002021 Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Tue, 3 Jan 2017 18:49:40 -0500 Subject: [PATCH 1/2] [tools] small tools/Makefile change for dash compatibility, change == to = --- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 8fd0c7a02a9..9fdc35da402 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -86,7 +86,7 @@ else ifeq ($(OS),Windows_NT) cd openfst-$(OPENFST_VERSION)/; ./configure --prefix=`pwd` --enable-static --enable-shared --enable-far --enable-ngram-fsts CXX=$(CXX) CXXFLAGS="$(CXXFLAGS) -O -Wa,-mbig-obj" LDFLAGS="$(LDFLAGS)" LIBS="-ldl" else # ppc64le needs the newsted config.guess to be correctly indentified - [ "$(shell uname -p)" == "ppc64le" ] && wget -O openfst-$(OPENFST_VERSION)/config.guess \ + [ "$(shell uname -p)" = "ppc64le" ] && wget -O openfst-$(OPENFST_VERSION)/config.guess \ "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" || \ echo "config.guess unchanged" cd openfst-$(OPENFST_VERSION)/; ./configure --prefix=`pwd` --enable-static --enable-shared --enable-far --enable-ngram-fsts CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="-ldl" From f1e0bcc737d451e7e2994cb9ce058729352943be Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Fri, 6 Jan 2017 15:47:03 -0500 Subject: [PATCH 2/2] Modify makefiles/default_rules.mk to print timing for tests --- src/makefiles/default_rules.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/makefiles/default_rules.mk b/src/makefiles/default_rules.mk index a329ee86706..91da11a2aad 100644 --- a/src/makefiles/default_rules.mk +++ b/src/makefiles/default_rules.mk @@ -78,16 +78,20 @@ test: test_compile @{ result=0; \ for x in $(TESTFILES); do \ printf "Running $$x ..."; \ + timestamp1=$$(date +"%s"); \ ./$$x >$$x.testlog 2>&1; \ - if [ $$? -ne 0 ]; then \ - echo "... FAIL $$x"; \ + ret=$$? \ + timestamp2=$$(date +"%s"); \ + time_taken=$$[timestamp2-timestamp1]; \ + if [ $$ret -ne 0 ]; then \ + echo " $${time_taken}s... FAIL $$x"; \ result=1; \ if [ -n "$TRAVIS" ] && [ -f core ] && command -v gdb >/dev/null 2>&1; then \ gdb $$x core -ex "thread apply all bt" -batch >>$$x.testlog 2>&1; \ rm -rf core; \ fi; \ else \ - echo "... SUCCESS"; \ + echo " $${time_taken}s... SUCCESS"; \ rm -f $$x.testlog; \ fi; \ done; \