Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Merge upstream Busted #2

Merged
merged 422 commits into from
Oct 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
422 commits
Select commit Hold shift + click to select a range
fce3163
Merge pull request #359 from starius/fix-memoryleak-on-exit-in-lua-5.1
DorianGray Feb 23, 2015
5f66060
Insert junit timestamp in each test suite
o-lim Feb 24, 2015
38259be
Merge pull request #362 from o-lim/fix-junit-timestamp
DorianGray Feb 24, 2015
4b64385
Fix configuration loading
o-lim Feb 24, 2015
6923151
Exit if error loading configuration
o-lim Feb 24, 2015
01e6066
Update lua_cliargs version dependency
o-lim Feb 24, 2015
8178656
Merge pull request #363 from o-lim/fix-configuration-loading
DorianGray Feb 25, 2015
554a493
Publish file match error from test file loader
o-lim Feb 24, 2015
3942ed8
Prefix error messages with "Error:"
o-lim Feb 24, 2015
d68b3cb
Validate parsed value for numeric command-line opt
o-lim Feb 25, 2015
fd32064
Refactor output handler / helper script error msg
o-lim Feb 25, 2015
04676aa
Pull in 'no test files' error message from say
o-lim Feb 25, 2015
a197590
Rename CLI option --no-recurse to --no-recursive
o-lim Feb 26, 2015
aa7f3d9
Add -l command-line option as alias to --list
o-lim Feb 26, 2015
96c72fb
Add French translation for error handling
iggyvolz Feb 25, 2015
3ec612a
Merge pull request #1 from iggyvolz/error-handling
o-lim Feb 26, 2015
faa2d7a
Merge pull request #365 from o-lim/cli-options
ajacksified Feb 26, 2015
7d67978
Merge pull request #364 from o-lim/error-handling
ajacksified Feb 26, 2015
0f10907
Check for possible nil command-line options
o-lim Feb 26, 2015
c66a4c7
Merge pull request #367 from o-lim/fix-missing-nil-check
DorianGray Feb 26, 2015
04844d0
Version 2.0.rc7-0
DorianGray Feb 27, 2015
72d8d10
keep scm rockspec updated, use in helper scripts
leafo Feb 28, 2015
3e8f78f
Merge pull request #368 from leafo/master
ajacksified Mar 1, 2015
f2e45ad
Replace ansicolors with lua-term
mpeterv Mar 6, 2015
a6e1edb
Fix passing arguments to helpers
mpeterv Mar 6, 2015
e30fc17
Merge pull request #374 from mpeterv/fix-helper-args
ajacksified Mar 6, 2015
8f7b4ef
Merge pull request #373 from mpeterv/use-lua-term
ajacksified Mar 6, 2015
bf72166
Fix getfenv
o-lim Mar 5, 2015
1a8c61d
Refactor context block execution
o-lim Feb 20, 2015
b2be075
Remove check for `done` variable at test end
o-lim Feb 20, 2015
0b95c52
Do not execute finally block if test not executed
o-lim Feb 24, 2015
0359b31
Only publish test start/end if before_each passes
o-lim Feb 24, 2015
63bdb0f
Do not export file executor to external modules
o-lim Feb 24, 2015
64519a2
Export publish/subscribe to external modules
o-lim Mar 3, 2015
3b304dd
Refactor test suite execution into separate file
o-lim Feb 24, 2015
64a3789
Execute setup/teardown for test suite
o-lim Feb 24, 2015
03fffcd
Rename refactor suite reinitialize to suite reset
o-lim Feb 25, 2015
6399a6f
Refactor test filtering into separate file
o-lim Feb 25, 2015
2859d60
Allow list type options to be specified many times
o-lim Feb 26, 2015
addce80
Refactor CLI parsing into a CLI module
o-lim Feb 28, 2015
263f6cf
Refactor error/failure output
o-lim Mar 2, 2015
12c4703
Refactor context block execution
o-lim Mar 5, 2015
467504f
Support multiple root paths from CLI
o-lim Mar 7, 2015
027ef4d
Support multiple --cwd options
o-lim Mar 7, 2015
91fbc3c
Support multiple --filter and --filter-out options
o-lim Mar 8, 2015
87cd840
Merge pull request #371 from o-lim/refactors-and-improvements
DorianGray Mar 9, 2015
f2667d4
Do not use colors on Windows if ANSICON is not defined
mpeterv Mar 10, 2015
f9ced04
Merge pull request #376 from mpeterv/fix-colors-windows
DorianGray Mar 11, 2015
57314f5
Restore arg after loading helper script
o-lim Mar 14, 2015
907e5c9
Merge pull request #380 from o-lim/restore-arg
DorianGray Mar 15, 2015
5b6542a
Merge pull request #2 from Olivine-Labs/master
nehz Mar 16, 2015
1300f5e
Arrow output character is not ascii
nehz Mar 16, 2015
ce08b99
Adding Spanish language for error handling
ntanquero Mar 16, 2015
a650a47
Merge pull request #383 from ntanquero/SpanishLang
ajacksified Mar 16, 2015
a3c3b4e
Changed double arrow to single arrow
nehz Mar 17, 2015
6875544
Updated cl_spec for changes to plainTerminal
nehz Mar 17, 2015
3c3fb94
Updated cl_spec for changes to plainTerminal
nehz Mar 17, 2015
470862a
Updated cl_spec for changes to plainTerminal
nehz Mar 17, 2015
d1b18f8
Merge pull request #382 from nehz/master
DorianGray Mar 17, 2015
5d8ebeb
Refactor current working directory
o-lim Mar 15, 2015
6e32b39
Refactor error messages
o-lim Mar 15, 2015
fc26ce6
Support both strict and lazy setup/teardown
o-lim Mar 15, 2015
053e52b
Refactor context block aliasing
o-lim Mar 15, 2015
e8d23e8
Default lazy setup/teardown with command-line flag
o-lim Mar 15, 2015
f789375
Merge pull request #385 from o-lim/chdir-to-cwd
DorianGray Mar 17, 2015
f8b3f77
Merge pull request #384 from o-lim/lazy-setup-teardown
DorianGray Mar 17, 2015
551ecb1
Add Spanish language to rockspec
mpeterv Mar 17, 2015
cf6923a
Merge pull request #386 from mpeterv/add-es-lang
ajacksified Mar 17, 2015
1c80cd9
Add Spanish language to rockspec
o-lim Mar 17, 2015
0d9e639
Merge pull request #387 from o-lim/es-lang-rockspec
DorianGray Mar 17, 2015
219628c
Add more tests for lazy/strict setup/teardown
o-lim Mar 18, 2015
77092e2
Merge pull request #388 from o-lim/lazy-strict-setup-teardown
DorianGray Mar 18, 2015
47e0bfe
Support for insulate/expose contexts
o-lim Mar 17, 2015
ce5afb8
Add --no-auto-insulate command-line flag
o-lim Mar 18, 2015
6fb1542
Merge pull request #389 from o-lim/insulate-expose
DorianGray Mar 19, 2015
8a4d223
Update TAP output handler
o-lim Mar 19, 2015
607db71
Fix --no-keep-going to skip support functions
o-lim Mar 26, 2015
524e698
Refactor overriding assert error with fail
o-lim Mar 26, 2015
06d5fb0
Export functions to busted API
o-lim Mar 26, 2015
ae4dac6
Improve configuration task loading
o-lim Mar 26, 2015
3777c72
Remove busted argument from output handlers
o-lim Mar 26, 2015
6b4313a
Refactor test file loader options
o-lim Mar 26, 2015
719d93b
Support disabling randomization in context blocks
o-lim Mar 26, 2015
b3b9984
Fix for running tests standalone
o-lim Mar 26, 2015
e8c09dc
Support `--no-flags` to disable features
o-lim Mar 24, 2015
4ef7c41
Update `--shuffle` and `--sort` command-line flags
o-lim Mar 24, 2015
43f6a79
Update rockspec for --no-flags compatibility
o-lim Mar 26, 2015
10ce261
Add command-line option to specify config file
o-lim Apr 1, 2015
3747d38
Merge pull request #390 from o-lim/tap-output
DorianGray Apr 3, 2015
e358b58
Merge pull request #398 from o-lim/fix-test-file-loading
DorianGray Apr 3, 2015
041b085
Merge pull request #395 from o-lim/export-api
DorianGray Apr 3, 2015
0e4c5ed
Merge pull request #396 from o-lim/config-loader
DorianGray Apr 3, 2015
b044c10
Merge pull request #397 from o-lim/norandomize
DorianGray Apr 3, 2015
39f73ae
Remove unused variable
o-lim Mar 20, 2015
c3ee7ba
Add a gtest style output handler
o-lim Mar 20, 2015
756ddcc
Merge pull request #394 from o-lim/gtest-output
DorianGray Apr 4, 2015
2433f68
Upgrade penlight version
o-lim Apr 6, 2015
8df3488
Update version of Lua/LuaJIT used by travis builds
o-lim Apr 6, 2015
d08d3d8
Add missing luasocket dependency
Alloyed Apr 7, 2015
9e8892f
Replace norandomize() with randomize(false)
o-lim Apr 12, 2015
7bd3f28
Merge pull request #402 from o-lim/upgrade-lua
DorianGray Apr 13, 2015
1aacac4
Merge pull request #401 from o-lim/upgrade-penlight
DorianGray Apr 13, 2015
c7ead79
Merge pull request #403 from Alloyed/add-luasocket-dependency
DorianGray Apr 13, 2015
0182abc
Merge pull request #407 from o-lim/randomize
DorianGray Apr 13, 2015
fae70cf
Only run moonscript tests if moonscript is present
o-lim Apr 13, 2015
f803173
Merge pull request #408 from o-lim/moonscript-tests
DorianGray Apr 13, 2015
feb5adb
Update rockspec to use https url for cloning
o-lim Apr 14, 2015
52c141b
Merge pull request #409 from o-lim/rockspec-https
DorianGray Apr 14, 2015
aab5d19
Use git protocol in scm rockspec
o-lim Apr 14, 2015
282040b
Merge pull request #410 from o-lim/fix-rockspec
DorianGray Apr 14, 2015
366b39c
v2.0.rc8
ajacksified Apr 15, 2015
d8218f0
Fix getmetatable calls
o-lim May 8, 2015
8a07655
Merge pull request #415 from o-lim/fix-getmetatable
DorianGray May 8, 2015
93453c3
Fix incorrect busted.version
May 8, 2015
762617b
Fix specs to match latest luassert changes
o-lim May 8, 2015
b410a0a
Remove unnecessary arg to gtest output handler
o-lim May 28, 2015
0b33df7
Merge pull request #417 from Pyrohh/fix-version
ajacksified May 28, 2015
960e5cd
Merge pull request #418 from o-lim/fix-gtest-output
ajacksified May 28, 2015
f9bfa97
Add luarocks backup server
o-lim May 30, 2015
f59a935
Update luarocks to version 2.2.2
o-lim May 30, 2015
772d1ae
Install released version of lua-ev
o-lim May 30, 2015
e8d51ac
Do not install lib-ev or copas
o-lim May 30, 2015
841520f
Refactor error type detection
o-lim May 30, 2015
c9fe25c
Wrap publish start/end messages in a safe call
o-lim May 30, 2015
fb5c666
Merge pull request #423 from o-lim/safe-publish
ajacksified May 30, 2015
b64a682
Merge pull request #422 from o-lim/refactor-error-detect
ajacksified May 30, 2015
a817b83
Merge pull request #416 from o-lim/update-specs-for-luassert
ajacksified May 30, 2015
f930f81
v2.0.rc9
ajacksified May 30, 2015
536d407
Remove ansicolors dependency from rockspec
o-lim May 30, 2015
619891c
Update osexit for LuaJIT
o-lim Jun 5, 2015
5e6d2ea
Update travis build to use LuaJIT v2.0.4
o-lim Jun 5, 2015
d4ede5e
Merge pull request #429 from o-lim/travis-update
DorianGray Jun 9, 2015
ec16887
Merge pull request #428 from o-lim/osexit-luajit
DorianGray Jun 9, 2015
7f2fb6c
Merge pull request #427 from o-lim/cleanup-rockspec
ajacksified Jun 9, 2015
aef8e27
Fix error in building luarocks
o-lim Jun 10, 2015
f969808
Merge pull request #430 from o-lim/fix-luarocks
DorianGray Jun 10, 2015
a6233a2
upgrade luassert, and v2.0.rc10
ajacksified Jun 20, 2015
37589d8
Add olivine-labs manifest server path to travis file
ajacksified Jun 20, 2015
b7f643d
Refactor default options
o-lim Jul 5, 2015
fd440f2
Refactor call to os.exit()
o-lim Jul 5, 2015
eaa9a37
Use socket.gettime() to calculate suite duration
o-lim Jul 5, 2015
d67378b
Merge pull request #438 from o-lim/refactor
DorianGray Jul 6, 2015
f137b4a
Refactor tests to use utils.executeex
o-lim Jul 10, 2015
4a477a4
Refactor exit code
o-lim Jul 10, 2015
4b38cf1
Merge pull request #441 from o-lim/refactor-exit
DorianGray Jul 14, 2015
e082261
Fix file test count for gtest output
o-lim Jul 17, 2015
1bb6238
Merge pull request #442 from o-lim/fix-gtest-output
DorianGray Jul 20, 2015
e55b496
Fix json output
o-lim Aug 18, 2015
727c0fe
Handle errors from __gc metamethods
o-lim Aug 17, 2015
af3a31c
Merge pull request #450 from o-lim/gc_metamethods
DorianGray Aug 18, 2015
b925524
Merge pull request #449 from o-lim/fix-json-output
DorianGray Aug 18, 2015
4a788d8
Fix tests for Windows
o-lim Aug 23, 2015
f694f71
Merge pull request #452 from o-lim/fix-windows-tests
DorianGray Aug 23, 2015
6dc0741
Added pt-BR language to i18n
sobrinho Sep 20, 2015
76de5cf
Merge pull request #454 from sobrinho/master
DorianGray Sep 22, 2015
bd7669b
Refactor output handler loader
o-lim Sep 20, 2015
5e2e734
Merge pull request #455 from o-lim/cleanup-loaders
DorianGray Sep 25, 2015
94c8307
Fix unintentional stack trace on exit
o-lim Oct 3, 2015
33d3a91
Merge pull request #456 from o-lim/fix-exit-on-error
DorianGray Oct 4, 2015
a36563c
Update lua_cliargs dependency
o-lim Oct 25, 2015
3007eda
Merge pull request #460 from o-lim/update-cliargs-deps
ajacksified Oct 26, 2015
4ac29e5
Version bump to 2.0rc10-1
ajacksified Oct 26, 2015
3cfe9bf
Ensure that pre-release versions of lua_cliargs 3 aren't used as a de…
ryanplusplus Oct 27, 2015
7649118
Update busted-scm-0.rockspec
ryanplusplus Oct 27, 2015
812b2e2
Merge pull request #462 from ryanplusplus/FixCliargsDependency
DorianGray Oct 27, 2015
9eb6c9c
Implement option to choose the lua interpreter
DorianGray Oct 27, 2015
21dafeb
Merge pull request #461 from DorianGray/lua-interpreter-option
DorianGray Oct 27, 2015
2c68aca
Release
DorianGray Oct 27, 2015
4e13e59
Add Gitter badge
gitter-badger Nov 20, 2015
4f09a67
Merge pull request #465 from gitter-badger/gitter-badge
ajacksified Nov 20, 2015
02f26cd
Upgrade to lua_cliargs 3.0-0
amireh Oct 24, 2015
3b44b45
Upgrade to lua_cliargs-3.0-1
amireh Jan 12, 2016
d2015fc
Merge pull request #458 from amireh/lua_cliargs--3.0
DorianGray Jan 12, 2016
159c519
Fix scm-rockspec with correct lua_cliargs version
o-lim Jan 15, 2016
1b52da3
Refactor copying of context in base output handler
o-lim Jan 11, 2016
7989876
Remove unused variable from utils
o-lim Jan 11, 2016
9b4160f
Add `match` to busted env and exported functions
o-lim Jan 11, 2016
5dbe16f
Fix for allowing `strict` usage in a test file
o-lim Jan 11, 2016
942a41d
Merge pull request #478 from o-lim/fix-scm-rockspec
DorianGray Jan 15, 2016
e958985
Merge pull request #477 from o-lim/fix-strict
DorianGray Jan 15, 2016
21bfd0a
Merge pull request #476 from o-lim/add-match
DorianGray Jan 15, 2016
64c0ce6
Merge pull request #475 from o-lim/refactor-context-copy
DorianGray Jan 15, 2016
7d75cc1
Merge pull request #474 from o-lim/fix-unused-vars
DorianGray Jan 15, 2016
a2a3be1
Allow junit output handler to save output to file
jamesharris-garmin Jan 28, 2016
d7ecf81
Fix to junit timestamp string format:
cjtallman Feb 2, 2016
644bb28
Merge pull request #486 from cjtallman/junit_timestamp_fix
ajacksified Feb 2, 2016
7d94962
Remove dependency on luasocket
o-lim Jan 18, 2016
c725556
Export time functions to busted public API
o-lim Jan 18, 2016
9578d56
Merge pull request #488 from o-lim/remove-luasocket
DorianGray Feb 12, 2016
56d938f
Merge pull request #485 from jimmyharris/junit-file-output
DorianGray Feb 12, 2016
e206c9c
Refactor test execution timing
o-lim Jan 22, 2016
a024b2e
Refactor cl_spec tests variable names
o-lim Feb 12, 2016
294179c
Fix error reporting for errors in message handlers
o-lim Feb 12, 2016
b2df646
Update auto completion scripts
o-lim Feb 15, 2016
e0d2e65
Fixes for using debugger
o-lim Feb 15, 2016
b694243
Add `-e STATEMENT` option to run Lua statements
o-lim Feb 15, 2016
4ddb466
Merge pull request #493 from o-lim/fix-for-debugging
DorianGray Feb 16, 2016
6103748
Merge pull request #489 from o-lim/fix-error-reporting
DorianGray Feb 16, 2016
a562d2c
Merge pull request #483 from o-lim/refactor-time-reporting
DorianGray Feb 16, 2016
5eeaff1
Output error message for bad configuration files
o-lim Feb 19, 2016
0ccaa8f
Merge pull request #494 from o-lim/error-on-bad-config-file
DorianGray Feb 19, 2016
413f994
Fix bad escape sequence
o-lim Feb 29, 2016
664f3e2
Merge pull request #499 from o-lim/fix-bad-escape-seq-error
DorianGray Mar 2, 2016
a3701e7
new travis infra as per moteus/lua-travis-example
istr Mar 11, 2016
0731a6d
Merge pull request #503 from istr/travis-infra
DorianGray Mar 11, 2016
269bdd8
Fix bash completion error
o-lim Apr 8, 2016
b30cd6d
Improve randomness by using /dev/urandom
o-lim Apr 8, 2016
86bc701
Merge pull request #507 from o-lim/fix-bash-completion
DorianGray Apr 8, 2016
58ed706
Merge pull request #508 from o-lim/improve-randomness
DorianGray Apr 9, 2016
d4431f2
Export children to busted public api
o-lim Apr 10, 2016
db6a4cf
Fixes for Windows
o-lim Apr 10, 2016
14a1610
Merge pull request #510 from o-lim/export-children
DorianGray Apr 11, 2016
b018823
Merge pull request #509 from o-lim/fix-for-windows
DorianGray Apr 11, 2016
909e49d
Make test file order deterministic
o-lim Apr 27, 2016
86dd1df
Merge pull request #514 from o-lim/deterministic-file-order
DorianGray Apr 28, 2016
f36259a
Fix the random seed sent to suite start
o-lim Apr 27, 2016
fcecf44
Remove unused parameter
o-lim May 3, 2016
75ed36b
Set the root context randomseed key
o-lim May 3, 2016
9d1afd4
Color randomizing note in gtest output handler
o-lim May 3, 2016
7f65b72
Support optional seed parameter to randomize()
o-lim May 3, 2016
9fbe843
Merge pull request #515 from o-lim/randomseed
DorianGray May 3, 2016
0796e7f
Allow multiple occurrences of `--pattern` option
o-lim Apr 21, 2016
8796182
Use monotime to measure time durations
o-lim May 8, 2016
8f15e49
Merge pull request #517 from o-lim/use-monotime
DorianGray May 10, 2016
f344bf4
Merge pull request #516 from o-lim/multiple-patterns
DorianGray May 10, 2016
52cc010
Support --exclude-pattern command-line option
o-lim Apr 21, 2016
012e3b4
Merge pull request #511 from o-lim/exclude-pattern
DorianGray May 10, 2016
4f1199a
Fix TAP output handler for --suppress-pending option
o-lim May 14, 2016
a9827af
Merge pull request #519 from o-lim/fix-tap-suppress-pending
DorianGray May 16, 2016
30a2143
v2.0.rc12
ajacksified May 25, 2016
c3d96a5
Fix version mismatch in rockspec
ajacksified May 25, 2016
72edf02
Options --sort takes precedence over --shuffle
o-lim May 28, 2016
0dee229
Option --list honors --sort, --shuffle, --suppress-pending
o-lim May 28, 2016
eb6367e
Merge pull request #522 from o-lim/list-shuffle-sort
DorianGray Jun 6, 2016
aa6f4c9
Support running standalone tests from stdin
o-lim May 26, 2016
2734e08
Rename output handler option for runner
o-lim May 27, 2016
1a7bfe6
Merge pull request #521 from o-lim/stdin-compatibility
DorianGray Jun 7, 2016
830f175
Fix testcase time
cjtallman Jun 10, 2016
cd6debf
Merge pull request #525 from cjtallman/junit_testcase_time
DorianGray Jun 14, 2016
4e4df7a
Use '%u' to format unsigned numbers
o-lim Jul 15, 2016
2d92840
Merge pull request #527 from o-lim/fix-format-unsigned-values
DorianGray Jul 16, 2016
ed3f708
Fix failing tests after penlight upgrade
o-lim Aug 29, 2016
8ff1fc9
Forward non-positive arg keys
o-lim Aug 29, 2016
b5060dd
Output error message when test file/dir not found
o-lim Aug 29, 2016
5f10a67
Merge pull request #533 from o-lim/fix-pl-upgrade
DorianGray Aug 29, 2016
b0aa72c
Merge pull request #532 from o-lim/forward-cmdline-args
DorianGray Aug 29, 2016
6a01c53
Merge pull request #531 from o-lim/file-not-found-error
DorianGray Aug 29, 2016
907cd54
add italian language support
haianos Oct 4, 2016
dcd49b0
add it lang rockspec support
haianos Oct 4, 2016
2a9bfe6
Merge pull request #536 from haianos/master
ajacksified Oct 11, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .luacov
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ return {
'luacov.runner$',
'luacov.stats$',
'luacov.tick$',
'ansicolors$',
'term$',
'term.colors$',
'term.cursor$',
'term.init$',
'copas$',
'coxpcall$',
'mediator$',
'moonscript.*$',
'socket$',
},


Expand Down
24 changes: 13 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
language: c

env:
- LUA='Lua 5.1'
- LUA='Lua 5.2'
- LUA='LuaJIT 2.0'
global:
- LUAROCKS=2.3.0
matrix:
- LUA=lua5.1
- LUA=lua5.2
- LUA=lua5.3
- LUA=luajit
- LUA=luajit2.0
- LUA=luajit2.1

before_install:
- bash .travis_setup.sh
- source .travis/setenv_lua.sh
- luarocks install luasec
- luarocks install moonscript

install:
- sudo apt-get update -qq
- sudo luarocks install luasec
- sudo apt-get install -qq libev-dev
- sudo luarocks install lua-ev scm --server=http://luarocks.org/repositories/rocks-scm/
- sudo luarocks install copas
- sudo luarocks install moonscript
- sudo luarocks make
- luarocks make busted-scm-0.rockspec

script: busted

Expand Down
15 changes: 15 additions & 0 deletions .travis/platform.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if [ -z "${PLATFORM:-}" ]; then
PLATFORM=$TRAVIS_OS_NAME;
fi

if [ "$PLATFORM" == "osx" ]; then
PLATFORM="macosx";
fi

if [ -z "$PLATFORM" ]; then
if [ "$(uname)" == "Linux" ]; then
PLATFORM="linux";
else
PLATFORM="macosx";
fi;
fi
3 changes: 3 additions & 0 deletions .travis/setenv_lua.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin
bash .travis/setup_lua.sh
eval `$HOME/.lua/luarocks path`
122 changes: 122 additions & 0 deletions .travis/setup_lua.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
#! /bin/bash

# A script for setting up environment for travis-ci testing.
# Sets up Lua and Luarocks.
# LUA must be "lua5.1", "lua5.2" or "luajit".
# luajit2.0 - master v2.0
# luajit2.1 - master v2.1

set -eufo pipefail

LUAJIT_VERSION="2.0.4"
LUAJIT_BASE="LuaJIT-$LUAJIT_VERSION"

source .travis/platform.sh

LUA_HOME_DIR=$TRAVIS_BUILD_DIR/install/lua

LR_HOME_DIR=$TRAVIS_BUILD_DIR/install/luarocks

mkdir $HOME/.lua

LUAJIT="no"

if [ "$PLATFORM" == "macosx" ]; then
if [ "$LUA" == "luajit" ]; then
LUAJIT="yes";
fi
if [ "$LUA" == "luajit2.0" ]; then
LUAJIT="yes";
fi
if [ "$LUA" == "luajit2.1" ]; then
LUAJIT="yes";
fi;
elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then
LUAJIT="yes";
fi

mkdir -p "$LUA_HOME_DIR"

if [ "$LUAJIT" == "yes" ]; then

if [ "$LUA" == "luajit" ]; then
curl --location https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz | tar xz;
else
git clone https://github.com/LuaJIT/LuaJIT.git $LUAJIT_BASE;
fi

cd $LUAJIT_BASE

if [ "$LUA" == "luajit2.1" ]; then
git checkout v2.1;
# force the INSTALL_TNAME to be luajit
perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile
fi

make && make install PREFIX="$LUA_HOME_DIR"

ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua;

else

if [ "$LUA" == "lua5.1" ]; then
curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz
cd lua-5.1.5;
elif [ "$LUA" == "lua5.2" ]; then
curl http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz
cd lua-5.2.4;
elif [ "$LUA" == "lua5.3" ]; then
curl http://www.lua.org/ftp/lua-5.3.2.tar.gz | tar xz
cd lua-5.3.2;
fi

# Build Lua without backwards compatibility for testing
perl -i -pe 's/-DLUA_COMPAT_(ALL|5_2)//' src/Makefile
make $PLATFORM
make INSTALL_TOP="$LUA_HOME_DIR" install;

ln -s $LUA_HOME_DIR/bin/lua $HOME/.lua/lua
ln -s $LUA_HOME_DIR/bin/luac $HOME/.lua/luac;

fi

cd $TRAVIS_BUILD_DIR

lua -v

LUAROCKS_BASE=luarocks-$LUAROCKS

curl --location http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz

cd $LUAROCKS_BASE

if [ "$LUA" == "luajit" ]; then
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
elif [ "$LUA" == "luajit2.0" ]; then
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
elif [ "$LUA" == "luajit2.1" ]; then
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.1" --prefix="$LR_HOME_DIR";
else
./configure --with-lua="$LUA_HOME_DIR" --prefix="$LR_HOME_DIR"
fi

make build && make install

ln -s $LR_HOME_DIR/bin/luarocks $HOME/.lua/luarocks

cd $TRAVIS_BUILD_DIR

luarocks --version

rm -rf $LUAROCKS_BASE

if [ "$LUAJIT" == "yes" ]; then
rm -rf $LUAJIT_BASE;
elif [ "$LUA" == "lua5.1" ]; then
rm -rf lua-5.1.5;
elif [ "$LUA" == "lua5.2" ]; then
rm -rf lua-5.2.4;
elif [ "$LUA" == "lua5.3" ]; then
rm -rf lua-5.3.2;
fi
37 changes: 0 additions & 37 deletions .travis_setup.sh

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Busted
======

[![Join the chat at https://gitter.im/Olivine-Labs/busted](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Olivine-Labs/busted?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![travis-ci status](https://secure.travis-ci.org/Olivine-Labs/busted.png)](http://travis-ci.org/#!/Olivine-Labs/busted/builds)

busted is a unit testing framework with a focus on being **easy to
Expand Down
Loading