Skip to content

Commit

Permalink
lua5.1 compatibility (#89)
Browse files Browse the repository at this point in the history
* lua5.1 compatibility

* Lua 5.1 through 5.3 using ci-lua and ENV VARIETY set on CI, defaults to 5.1 if not present

* running Lua tests fixed

* removed bash debug/verbose execution

* Codestyle

Co-authored-by: Mikhail Yakshin <greycat.na.kor@gmail.com>

* Update ci-lua

Co-authored-by: Petr Pučil <petr.pucil@seznam.cz>

* revert lua version specific changes to tests

* Update kst-adoption-report

Co-authored-by: Petr Pučil <petr.pucil@seznam.cz>

* simplify ci-lua

Co-authored-by: Mikhail Yakshin <greycat.na.kor@gmail.com>
Co-authored-by: Petr Pučil <petr.pucil@seznam.cz>
  • Loading branch information
3 people committed Aug 13, 2020
1 parent 9fc2a0e commit ec48b35
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
21 changes: 7 additions & 14 deletions ci-lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,17 @@

. ./config

rm -rf "$TEST_OUT_DIR/lua"
mkdir -p "$TEST_OUT_DIR/lua"
LUA_OUT_DIR="${TEST_OUT_DIR}/lua"

rm -rf "${LUA_OUT_DIR}"
mkdir -p "${LUA_OUT_DIR}"

export LUA_PATH="$LUA_PATH;$LUA_RUNTIME_DIR/?.lua;spec/lua/?.lua;spec/lua/extra/?.lua;compiled/lua/?.lua;;"

# Add `lua_install` dir to PATH, as this is where hererocks installs Lua at CI
export PATH=$PATH:$PWD/../lua_install/bin

# Detect lua executable
if lua5.3 -v; then
LUA_BIN=lua5.3
elif lua -v; then
LUA_BIN=lua
else
echo "Unable to detect lua executable, bailing out :("
exit 1
fi

"$LUA_BIN" spec/lua/run_test_suite.lua -v -o junit -n "$TEST_OUT_DIR/lua/report"
lua spec/lua/run_test_suite.lua --output junit --name "${LUA_OUT_DIR}/report"

./kst-adoption-report lua
aggregate/convert_to_json lua "$TEST_OUT_DIR/lua" "$TEST_OUT_DIR/lua/ci.json"
aggregate/convert_to_json lua "${LUA_OUT_DIR}" "${LUA_OUT_DIR}/ci.json"
2 changes: 1 addition & 1 deletion run-lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

export LUA_PATH="$LUA_PATH;$LUA_RUNTIME_DIR/?.lua;spec/lua/?.lua;spec/lua/extra/?.lua;compiled/lua/?.lua;;"

lua5.3 spec/lua/run_test_suite.lua -v
lua spec/lua/run_test_suite.lua -v
2 changes: 1 addition & 1 deletion spec/lua/run_test_suite.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ec48b35

Please sign in to comment.