aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/lua.sh
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-02 20:12:08 +0900
committernsfisis <nsfisis@gmail.com>2026-05-02 20:14:03 +0900
commit3b1a2de0ae0a7f8e25e348df43213fd6bf2ef0d4 (patch)
tree3a6cae33bcee4ab6c93a9a2f89f4ff8355964b0e /tests/lua.sh
parentee7da1ce9c1efd76bf02e7a5d2591bf8099ef0ca (diff)
downloadducc-3b1a2de0ae0a7f8e25e348df43213fd6bf2ef0d4.tar.gz
ducc-3b1a2de0ae0a7f8e25e348df43213fd6bf2ef0d4.tar.zst
ducc-3b1a2de0ae0a7f8e25e348df43213fd6bf2ef0d4.zip
test: test lua compilation
Diffstat (limited to 'tests/lua.sh')
-rw-r--r--tests/lua.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/lua.sh b/tests/lua.sh
new file mode 100644
index 0000000..7c96e08
--- /dev/null
+++ b/tests/lua.sh
@@ -0,0 +1,30 @@
+LUA_REPO=https://github.com/lua/lua.git
+LUA_TAG=v5.5.0
+
+if [[ ! -d ../../lua ]]; then
+ git clone --depth=1 --revision="$LUA_TAG" "$LUA_REPO" ../../lua
+fi
+
+cat > makefile.patch <<'EOF'
+--- a/makefile
++++ b/makefile
+@@ -76,8 +76,8 @@ MYLDFLAGS= -Wl,-E
+ MYLIBS= -ldl
+
+
+-CC= gcc
+-CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native
++CC= ../../build/ducc
++CFLAGS+= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native
+ AR= ar rc
+ RANLIB= ranlib
+ RM= rm -f
+EOF
+
+(
+ cd ../../lua
+ if ! git apply --reverse --check < ../tmp/lua/makefile.patch 2>/dev/null; then
+ git apply < ../tmp/lua/makefile.patch
+ fi
+ make
+)