From 6bee469ea0c67cc1cc7efd07083b97e9a1c8ac4d Mon Sep 17 00:00:00 2001 From: chrox Date: Tue, 25 Mar 2014 22:26:36 +0800 Subject: [PATCH] add make test in Makefile and README file --- Makefile | 5 +++++ README.md | 32 +++++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b40e5715a..72e0b7e31 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,11 @@ endif $(KOR_BASE)/$(OUTPUT_DIR)/luajit: $(MAKE) -C $(KOR_BASE) +test: + $(MAKE) -C $(KOR_BASE) test + +.PHONY: test + fetchthirdparty: git submodule init git submodule update diff --git a/README.md b/README.md index 5d7f67112..9a89c2b40 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,13 @@ Instructions about how to get and compile the source are intended for a \*nix OS. Windows users are suggested to develop in a Linux VM or use andLinux, Wubi. -To get and compile the source you must have `patch`, `wget`, `unzip`, `git`, -`svn`, `autoconf` and `cmake` installed. +To get and compile the source you must have `patch`, `wget`, `unzip`, `git`, `autoconf` +and `cmake` installed. Version of autoconf need to be greater than 2.64. -Version of autoconf need to be greater than 2.64. +Ubuntu users may need to run: +``` +sudo apt-get install build-essential +``` Cross toolchains are available to Ubuntu users through these commands: ``` @@ -39,9 +42,11 @@ sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf ``` You might also need SDL library packages if you want to compile and run -Koreader on PC. Fedora users can install `SDL` and `SDL-devel`. Ubuntu users can -install `libsdl1.2-dev`. - +Koreader on PC. Fedora users can install `SDL` and `SDL-devel`. +Ubuntu users probably have to run: +``` +sudo apt-get install libsdl1.2-dev +``` Getting the source ======== @@ -53,7 +58,7 @@ make fetchthirdparty ``` -Building & Running +Building & Running & Testing ======== For real eink devices @@ -99,6 +104,17 @@ To run: cd koreader-*/koreader && ./reader.lua -d ./ ``` +To test: +``` +make test +``` + +You may need to checkout the [travis config file][travis-conf] to setup up +a proper testing environment. Briefly, you need to install `luarocks` and +then install `busted` with `luarocks`. The "eng" language data file for +tesseract-ocr is also need to test OCR functionality. Finally, make sure +that `luajit` in your system is at least of version 2.0.2. + You can also specify size of emulator's screen via environment variables. For more information, please refer to [koreader-base's README][base-readme]. @@ -138,6 +154,8 @@ http://ccache.samba.org [nb-script]:https://github.com/koreader/koreader-misc/blob/master/koreader-nightlybuild/koreader-nightlybuild.sh [travis-icon]:https://travis-ci.org/koreader/koreader-base.png?branch=master [travis-link]:https://travis-ci.org/koreader/koreader-base +[travis-conf]:https://github.com/koreader/koreader-base/blob/master/.travis.yml [bitdeli-icon]:https://d2weczhvl823v0.cloudfront.net/koreader/koreader/trend.png [bitdeli-link]:https://bitdeli.com/free "Bitdeli Badge" +