Skip to content

Commit 5cdbd18

Browse files
authored
[build] Makefile changes: print time for tests; dash-compatibility change (kaldi-asr#1322)
1 parent a4b2091 commit 5cdbd18

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/makefiles/default_rules.mk

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,20 @@ test: test_compile
7878
@{ result=0; \
7979
for x in $(TESTFILES); do \
8080
printf "Running $$x ..."; \
81+
timestamp1=$$(date +"%s"); \
8182
./$$x >$$x.testlog 2>&1; \
82-
if [ $$? -ne 0 ]; then \
83-
echo "... FAIL $$x"; \
83+
ret=$$? \
84+
timestamp2=$$(date +"%s"); \
85+
time_taken=$$[timestamp2-timestamp1]; \
86+
if [ $$ret -ne 0 ]; then \
87+
echo " $${time_taken}s... FAIL $$x"; \
8488
result=1; \
8589
if [ -n "$TRAVIS" ] && [ -f core ] && command -v gdb >/dev/null 2>&1; then \
8690
gdb $$x core -ex "thread apply all bt" -batch >>$$x.testlog 2>&1; \
8791
rm -rf core; \
8892
fi; \
8993
else \
90-
echo "... SUCCESS"; \
94+
echo " $${time_taken}s... SUCCESS"; \
9195
rm -f $$x.testlog; \
9296
fi; \
9397
done; \

tools/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ else ifeq ($(OS),Windows_NT)
8686
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"
8787
else
8888
# ppc64le needs the newsted config.guess to be correctly indentified
89-
[ "$(shell uname -p)" == "ppc64le" ] && wget -O openfst-$(OPENFST_VERSION)/config.guess \
89+
[ "$(shell uname -p)" = "ppc64le" ] && wget -O openfst-$(OPENFST_VERSION)/config.guess \
9090
"http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" || \
9191
echo "config.guess unchanged"
9292
cd openfst-$(OPENFST_VERSION)/; ./configure --prefix=`pwd` --enable-static --enable-shared --enable-far --enable-ngram-fsts CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="-ldl"

0 commit comments

Comments
 (0)