Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

lut 1.0.2 #2

Merged
merged 9 commits into from

3 participants

@lubyk

I changed the "travis.yml" file so that tests are run. Please also change the email back to luadist. I removed notifications to the list to avoid noise during development cycle but I think it is good to have it once in luadist.

The way I changed the travis.yml, if any test fails, it returns a "build error".

Cheers,

Gaspard

PS: the previous pull request contained errors in the travis.yml when cross-compiling.

@drahosp drahosp merged commit 4782bdd into from
@drahosp
Owner

I kept the original .travis.yml to make sure its in line with other packages. This will change in the future with the new CI server running Jenkins. It is merged in, Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
17 .travis.yml
@@ -11,14 +11,15 @@ env:
- TOOL="clang" # Use clang
- TOOL="i686-w64-mingw32" # 32bit MinGW
- TOOL="x86_64-w64-mingw32" # 64bit MinGW
- - TOOL="arm-linux-gnueabihf" # ARM hard-float (hf), linux
+# Always fails because lua does not build.
+# - TOOL="arm-linux-gnueabihf" # ARM hard-float (hf), linux
# Crosscompile builds may fail
-matrix:
- allow_failures:
- - env: TOOL="i686-w64-mingw32"
- - env: TOOL="x86_64-w64-mingw32"
- - env: TOOL="arm-linux-gnueabihf"
+# matrix:
+# allow_failures:
+# - env: TOOL="i686-w64-mingw32"
+# - env: TOOL="x86_64-w64-mingw32"
+# - env: TOOL="arm-linux-gnueabihf"
# Install dependencies
install:
@@ -31,7 +32,7 @@ before_script:
# Build the module
script:
- - ~/_tools/travis/travis build
+ - ~/_tools/travis/travis build && (test -e ~/build/lubyk/lut/_test/bin/lua.exe || ~/build/lubyk/lut/_test/bin/lua test/all.lua)
# Execute additional tests or commands
after_script:
@@ -45,7 +46,7 @@ branches:
# Notify the LuaDist Dev group if needed
notifications:
recipients:
- - luadist-dev@googlegroups.com
+ - gaspard@teti.ch
email:
on_success: change
on_failure: always
View
2  CMakeLists.txt
@@ -5,7 +5,7 @@ cmake_minimum_required ( VERSION 2.8 )
include ( cmake/dist.cmake )
include ( lua )
-install(
+install (
DIRECTORY lut/
DESTINATION ${INSTALL_LMOD}/lut
COMPONENT Runtime
View
2  README.md
@@ -1,4 +1,4 @@
-lut
+lut [![Build Status](https://travis-ci.org/lubyk/lut.png)](https://travis-ci.org/lubyk/lut)
===
Lubyk utility library (provides documentation generation from lua code and testing).
View
4 dist.info
@@ -1,7 +1,7 @@
--- This file is part of Lubyk project
name = "lut"
-version = "1.0.0"
+version = "1.0.2"
desc = "Utility module for lubyk. Contains a documentation generator and testing facilities."
author = "Gaspard Bucher"
@@ -10,6 +10,6 @@ url = "http://lubyk.org"
maintainer = "Gaspard Bucher"
depends = {
- "lua ~> 5.1",
+ "lua >= 5.1, < 5.3",
"lub ~> 1.0",
}
View
13 doc/index.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>lub</title>
+ </head>
+ <body>
+ <h3>Online documentation</h3>
+ <p><a href='http://doc.lubyk.org/lub.html'>doc.lubyk.org/lub.html</a></h1></p>
+
+ <h3>Generate</h3>
+ <pre>$ lua scripts/makedoc.lua</pre>
+ </body>
+</html>
View
40 lut-1.0.0-1.rockspec
@@ -1,40 +0,0 @@
-package = "Lut"
-version = "1.0.0-1"
-source = {
- url = "http://lubyk.org/archive/REL-1.0.0.tar.gz",
- dir = 'lut-REL-1.0.0',
-}
-description = {
- summary = "Utility module for lubyk. Contains a documentation generator and testing facilities.",
- detailed = [[
- lub.Doc: a powerful documentation generator for Lua code with support for
- litterate programming, cross-reference linking, images, latex math, etc.
-
- lub.Test: unit testing framework.
- ]],
- -- lub.Test: A simple yet powerful unit testing framework.
- homepage = "http://lubyk.org",
- license = "MIT"
-}
-dependencies = {
- "lua ~> 5.1",
- "lub ~> 1.0",
-}
-build = {
- type = 'builtin',
- modules = {
- ['lut.Doc'] = 'lut/Doc.lua',
- ['lut' ] = 'lut/init.lua',
- ['lut.Test'] = 'lut/Test.lua',
- },
- install = {
- lua = {
- ['lut.doc.template'] = 'lut/doc/template.html',
- ['lut.doc.css.bootstrap_min_css'] = 'lut/doc/css/bootstrap.min.css',
- ['lut.doc.css.docs_css'] = 'lut/doc/css/docs.css',
- ['lut.doc.img.glyphicons-halflings-white_png'] = 'lut/doc/img/glyphicons-halflings-white.png',
- ['lut.doc.img.glyphicons-halflings_png'] = 'lut/doc/img/glyphicons-halflings.png',
- ['lut.doc.js.bootstrap_min_js'] = 'lut/doc/js/bootstrap.min.js',
- },
- }
-}
View
39 lut-1.0.2-1.rockspec
@@ -0,0 +1,39 @@
+package = "lut"
+version = "1.0.2-1"
+source = {
+ url = "http://lubyk.org/archive/lut-REL-1.0.2.tar.gz",
+ dir = 'lut-REL-1.0.2',
+}
+description = {
+ summary = "Utility module for lubyk. Contains a documentation generator and testing facilities.",
+ detailed = [[
+ lub.Doc: a powerful documentation generator for Lua code with support for
+ litterate programming, cross-reference linking, images, latex math, etc.
+
+ lub.Test: unit testing framework.
+ ]],
+ homepage = "http://lubyk.org",
+ license = "MIT"
+}
+dependencies = {
+ "lua >= 5.1, < 5.3",
+ "lub ~> 1.0",
+}
+build = {
+ type = 'builtin',
+ modules = {
+ ['lut' ] = 'lut/init.lua',
+ ['lut.Doc' ] = 'lut/Doc.lua',
+ ['lut.Test' ] = 'lut/Test.lua',
+ },
+ install = {
+ lua = {
+ ['lut.doc.template'] = 'lut/doc/template.html',
+ ['lut.doc.css.bootstrap_min_css'] = 'lut/doc/css/bootstrap.min.css',
+ ['lut.doc.css.docs_css'] = 'lut/doc/css/docs.css',
+ ['lut.doc.img.glyphicons-halflings-white_png'] = 'lut/doc/img/glyphicons-halflings-white.png',
+ ['lut.doc.img.glyphicons-halflings_png'] = 'lut/doc/img/glyphicons-halflings.png',
+ ['lut.doc.js.bootstrap_min_js'] = 'lut/doc/js/bootstrap.min.js',
+ },
+ }
+}
View
14 lut/Test.lua
@@ -20,7 +20,8 @@ local current = nil
--
-- Full test file example:
--
--- require 'lut'
+-- local lub = require 'lub'
+-- local lut = require 'lut'
-- local should = lut.Test 'animal.Dog'
--
-- function should.bark()
@@ -159,6 +160,9 @@ end
--
-- -- Run all tests now.
-- should:test()
+--
+-- WARN: Once tests are run, this function calls `os.exit` with a return code of 0
+-- (success) or -1 (failure).
-- nodoc
function lib:test(batch)
@@ -178,13 +182,17 @@ end
-- Test all files in `list_or_path` matching `pattern`. Typical usage is to
-- create an `all.lua` file in the tests folder with:
--
--- require 'lut'
+-- local lub = require 'lub'
+-- local lut = require 'lut'
-- lut.Test.files(lub.path '|')
--
-- This will run tests for all files matching the default pattern `%_test.lua$`.
-- If the optional `reject` pattern is provided, paths matching this pattern
-- will be, well, rejected. See [lub.path](lub.html#path) for details on the
-- pipe syntax.
+--
+-- WARN: Once tests are run, this function calls `os.exit` with a return code of 0
+-- (success) or -1 (failure).
function lib.files(list_or_path, pattern, reject)
private.parseArgs()
pattern = pattern or '%_test.lua$'
@@ -609,6 +617,8 @@ function private.report()
end
end
print('')
+
+ os.exit(lib.total_fail == 0 and 0 or -1)
end
return lib
View
7 lut/init.lua
@@ -7,10 +7,9 @@
--]]--------------------
local lub = require 'lub'
local lib = lub.Autoload 'lut'
-lut = lib
--- Current version for 'lut' module. Minor version numbers are never released
--- and are used during development.
-lib.VERSION = '1.0.0'
+-- Current version for 'lut' module. Odd minor version numbers are never
+-- released and are used during development.
+lib.VERSION = '1.0.2'
return lib
View
4 scripts/CMakeLists.txt.in
@@ -6,8 +6,10 @@ cmake_minimum_required ( VERSION 2.8 )
include ( cmake/dist.cmake )
include ( lua )
-install(DIRECTORY {{mod.type}}
+install (
+ DIRECTORY {{mod.type}}/
DESTINATION ${INSTALL_LMOD}/{{mod.type}}
+ COMPONENT Runtime
)
install_data ( README.md LICENSE )
View
4 scripts/dist.info.in
@@ -1,7 +1,7 @@
{% mod = require 'lut' %}
--- This file is part of Lubyk project
-name = "Lut"
+name = "{{mod.type}}"
version = "{{mod.VERSION}}"
desc = "Utility module for lubyk. Contains a documentation generator and testing facilities."
@@ -11,6 +11,6 @@ url = "http://lubyk.org"
maintainer = "Gaspard Bucher"
depends = {
- "lua ~> 5.1",
+ "lua >= 5.1, < 5.3",
"lub ~> 1.0",
}
View
11 scripts/makedoc.lua
@@ -1,17 +1,16 @@
-local lub = require 'lub'
-lub.Doc.make {
+local lut = require 'lut'
+lut.Doc.make {
sources = {
- 'lub',
+ 'lut',
},
- head = '<meta name="google-site-verification" content="p1ZrKNheIo5xMhrMOo9MxKaY2hL9LlyuPYyRnEl2QuM" />',
target = 'doc',
format = 'html',
- header = [[ <a href='http://lubyk.org'><img alt='lubyk logo' src='img/lubyk.png'/></a> <h1><a href='http://doc.lubyk.org'>Lubyk documentation</a></h1></a> ]],
+ header = [[<h1><a href='http://doc.lubyk.org'>Lubyk documentation</a></h1></a> ]],
index = [=[
--[[--
# Lubyk documentation
- ## List of available modules in lubyk
+ ## List of available modules
--]]--
]=]
}
View
38 scripts/rockspec.in
@@ -1,41 +1,39 @@
{% mod = require 'lut' %}
-package = "Lut"
+package = "{{mod.type}}"
version = "{{mod.VERSION}}-1"
source = {
- url = "http://lubyk.org/archive/REL-{{mod.VERSION}}.tar.gz",
- dir = '{{mod.type}}-REL-{{mod.VERSION}}',
+ url = "http://lubyk.org/archive/{{mod.type}}-REL-{{mod.VERSION}}.tar.gz",
+ dir = '{{mod.type}}-REL-{{mod.VERSION}}',
}
description = {
- summary = "Utility module for lubyk. Contains a documentation generator and testing facilities.",
- detailed = [[
- lub.Doc: a powerful documentation generator for Lua code with support for
- litterate programming, cross-reference linking, images, latex math, etc.
-
- lub.Test: unit testing framework.
- ]],
- -- lub.Test: A simple yet powerful unit testing framework.
- homepage = "http://lubyk.org",
- license = "MIT"
+ summary = "Utility module for lubyk. Contains a documentation generator and testing facilities.",
+ detailed = [[
+ lub.Doc: a powerful documentation generator for Lua code with support for
+ litterate programming, cross-reference linking, images, latex math, etc.
+
+ lub.Test: unit testing framework.
+ ]],
+ homepage = "http://lubyk.org",
+ license = "MIT"
}
dependencies = {
- "lua ~> 5.1",
- "lub ~> 1.0",
+ "lua >= 5.1, < 5.3",
+ "lub ~> 1.0",
}
build = {
type = 'builtin',
modules = {
+ {{string.format("[%-17s] = '%s/%s.lua'", "'"..mod.type.."'", mod.type, 'init')}},
{% for file in lfs.dir(mod.type) do %}
-{% if file == 'init.lua' then %}
- ['{{mod.type}}' ] = '{{mod.type}}/init.lua',
-{% elseif file:match('.lua$') then file = file:sub(1, -5) %}
- ['{{mod.type}}.{{file}}'] = '{{mod.type}}/{{file}}.lua',
+{% if file ~= 'init.lua' and file:match('.lua$') then file = file:sub(1, -5) %}
+ {{string.format("[%-17s] = '%s/%s.lua'", "'"..mod.type..'.'..file.."'", mod.type, file)}},
{% end %}
{% end %}
},
install = {
lua = {
['lut.doc.template'] = 'lut/doc/template.html',
-{% for _, path in ipairs(lut.Doc.ASSETS) do %}
+{% for _, path in ipairs(mod.Doc.ASSETS) do %}
['lut.doc.{{path:gsub('[.]', '_'):gsub('/', '.')}}'] = 'lut/doc/{{path}}',
{% end %}
},
View
3  test/Doc_test.lua
@@ -3,7 +3,8 @@
lut.Doc test
--]]------------------------------------------------------
-require 'lut'
+local lub = require 'lub'
+local lut = require 'lut'
local should = lut.Test 'lut.Doc'
local tmp = lub.path '|fixtures/tmp'
View
3  test/Test_test.lua
@@ -3,7 +3,8 @@
lub.Doc test
--]]------------------------------------------------------
-require 'lut'
+local lub = require 'lub'
+local lut = require 'lut'
local should = lut.Test('lut.Test', { coverage = false })
function should.assertTrue()
View
3  test/all.lua
@@ -1,4 +1,5 @@
-require 'lut'
+local lub = require 'lub'
+local lut = require 'lut'
lut.Test.files(lub.path '|')
Something went wrong with that request. Please try again.