aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/compile-lua.sh6
-rw-r--r--scripts/setup-test-tools.sh22
-rw-r--r--scripts/unittest.sh6
3 files changed, 34 insertions, 0 deletions
diff --git a/scripts/compile-lua.sh b/scripts/compile-lua.sh
new file mode 100644
index 0000000000..9187c07877
--- /dev/null
+++ b/scripts/compile-lua.sh
@@ -0,0 +1,6 @@
+. scripts/common.sh
+
+lua_dir="$pkgroot/third-party/luajit"
+
+cd "$lua_dir"
+make PREFIX="$prefix" install
diff --git a/scripts/setup-test-tools.sh b/scripts/setup-test-tools.sh
new file mode 100644
index 0000000000..3e4a274f59
--- /dev/null
+++ b/scripts/setup-test-tools.sh
@@ -0,0 +1,22 @@
+. scripts/common.sh
+
+luarocks_ver=v2.1.2
+luarocks_repo=keplerproject/luarocks
+luarocks_sha1=69ea9b641a5066b1f316847494d8c63a4693977d
+luarocks_dir="$pkgroot/third-party/luarocks"
+
+github_download "$luarocks_repo" "$luarocks_ver" "$luarocks_dir" \
+ "$luarocks_sha1"
+
+cd "$luarocks_dir"
+
+./configure --prefix="$prefix" --force-config --with-lua="$prefix" \
+ --with-lua-include="$prefix/include/luajit-2.0" \
+ --lua-suffix="jit"
+
+make bootstrap
+
+# install tools for testing
+luarocks install moonrocks --server=http://rocks.moonscript.org
+moonrocks install moonscript
+moonrocks install busted
diff --git a/scripts/unittest.sh b/scripts/unittest.sh
new file mode 100644
index 0000000000..f792308275
--- /dev/null
+++ b/scripts/unittest.sh
@@ -0,0 +1,6 @@
+. scripts/common.sh
+
+(cd "$pkgroot/build" && make) || exit 1
+eval "$(luarocks path)"
+
+busted --pattern=.moon ./test