Skip to content

Commit

Permalink
Merge pull request #1116 from Shreeshrii/fixunittest
Browse files Browse the repository at this point in the history
delete gunit.h; add merge_unicharsets to build
  • Loading branch information
zdenop authored Sep 11, 2017
2 parents c50e4f6 + 9a038f8 commit 7569c89
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 20 deletions.
40 changes: 33 additions & 7 deletions training/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ libtesseract_training_la_LIBADD = \
# ../api/libtesseract.la

libtesseract_training_la_SOURCES = \
boxchar.cpp commandlineflags.cpp commontraining.cpp degradeimage.cpp \
boxchar.cpp commandlineflags.cpp commontraining.cpp degradeimage.cpp \
fileio.cpp lang_model_helpers.cpp ligature_table.cpp lstmtester.cpp \
normstrngs.cpp pango_font_info.cpp stringrenderer.cpp tlog.cpp unicharset_training_utils.cpp \
validate_grapheme.cpp validate_indic.cpp validate_khmer.cpp \
Expand All @@ -41,9 +41,22 @@ libtesseract_training_la_SOURCES = \
libtesseract_tessopt_la_SOURCES = \
tessopt.cpp

bin_PROGRAMS = ambiguous_words classifier_tester cntraining combine_lang_model combine_tessdata \
dawg2wordlist lstmeval lstmtraining mftraining set_unicharset_properties shapeclustering \
text2image unicharset_extractor wordlist2dawg
bin_PROGRAMS = \
ambiguous_words\
classifier_tester \
cntraining \
combine_lang_model \
combine_tessdata \
dawg2wordlist \
lstmeval \
lstmtraining \
merge_unicharsets \
mftraining \
set_unicharset_properties \
shapeclustering \
text2image \
unicharset_extractor \
wordlist2dawg

ambiguous_words_SOURCES = ambiguous_words.cpp
ambiguous_words_LDADD = \
Expand Down Expand Up @@ -216,6 +229,19 @@ lstmtraining_LDADD += \
../api/libtesseract.la
endif

merge_unicharsets_SOURCES = merge_unicharsets.cpp
#merge_unicharsets_LDFLAGS = -static
merge_unicharsets_LDADD = \
libtesseract_tessopt.la
if USING_MULTIPLELIBS
merge_unicharsets_LDADD += \
../ccutil/libtesseract_ccutil.la \
../ccstruct/libtesseract_ccstruct.la
else
merge_unicharsets_LDADD += \
../api/libtesseract.la
endif

mftraining_SOURCES = mftraining.cpp mergenf.cpp
#mftraining_LDFLAGS = -static
mftraining_LDADD = \
Expand Down Expand Up @@ -319,9 +345,7 @@ text2image_LDADD += $(ICU_UC_LIBS) -lpango-1.0 -lpangocairo-1.0 \
unicharset_extractor_SOURCES = unicharset_extractor.cpp
#unicharset_extractor_LDFLAGS = -static
unicharset_extractor_LDADD = \
libtesseract_training.la \
libtesseract_tessopt.la \
$(ICU_I18N_LIBS) $(ICU_UC_LIBS)
libtesseract_tessopt.la
if USING_MULTIPLELIBS
unicharset_extractor_LDADD += \
../ccutil/libtesseract_ccutil.la \
Expand Down Expand Up @@ -360,6 +384,7 @@ classifier_tester_LDADD += -lws2_32
cntraining_LDADD += -lws2_32
combine_tessdata_LDADD += -lws2_32
dawg2wordlist_LDADD += -lws2_32
merge_unicharsets_LDADD += -lws2_32
mftraining_LDADD += -lws2_32
set_unicharset_properties_LDADD += -lws2_32
shapeclustering_LDADD += -lws2_32
Expand All @@ -375,6 +400,7 @@ classifier_tester_LDFLAGS = $(OPENCL_LDFLAGS)
cntraining_LDFLAGS = $(OPENCL_LDFLAGS)
combine_tessdata_LDFLAGS = $(OPENCL_LDFLAGS)
dawg2wordlist_LDFLAGS = $(OPENCL_LDFLAGS)
merge_unicharsets_LDFLAGS = $(OPENCL_LDFLAGS)
mftraining_LDFLAGS = $(OPENCL_LDFLAGS)
set_unicharset_properties_LDFLAGS = $(OPENCL_LDFLAGS)
shapeclustering_LDFLAGS = $(OPENCL_LDFLAGS)
Expand Down
11 changes: 11 additions & 0 deletions unittest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Unit Testing for Tesseract
----------

To run the tests, do the following in tesseract folder

```
autoreconf -fiv
git submodule update --init
export TESSDATA_PREFIX=/prefix/to/path/to/tessdata
make check
```
12 changes: 0 additions & 12 deletions unittest/gunit.h

This file was deleted.

2 changes: 1 addition & 1 deletion unittest/matrix_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////

#include "matrix.h"
#include "gunit.h"
#include "include_gunit.h"
#include "genericvector.h"
#include "tprintf.h"

Expand Down

0 comments on commit 7569c89

Please sign in to comment.