]> git.lizzy.rs Git - worldedit.git/commitdiff
Rename util folder
authorsfan5 <sfan5@live.de>
Mon, 20 Sep 2021 23:34:10 +0000 (01:34 +0200)
committersfan5 <sfan5@live.de>
Mon, 20 Sep 2021 23:34:10 +0000 (01:34 +0200)
because mod loading woes, minetest/minetest#11240

.github/workflows/test.yml
.util/run_tests.sh [new file with mode: 0755]
util/run_tests.sh [deleted file]

index 597276f193ec9870774aa52bd5c6f533952cada6..7c679afbb750698c9608302a2eca4e2d7eeffb20 100644 (file)
@@ -8,4 +8,4 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - name: Run tests
-      run: MINETEST_VER=latest ./util/run_tests.sh
+      run: MINETEST_VER=latest ./.util/run_tests.sh
diff --git a/.util/run_tests.sh b/.util/run_tests.sh
new file mode 100755 (executable)
index 0000000..5cbc15e
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+tempdir=/tmp/mt
+confpath=$tempdir/minetest.conf
+worldpath=$tempdir/world
+
+use_docker=y
+[ -x ../../bin/minetestserver ] && use_docker=
+
+rm -rf $tempdir
+mkdir -p $worldpath
+# the docker image doesn't have devtest
+[ -n "$use_docker" ] || printf '%s\n' gameid=devtest >$worldpath/world.mt
+printf '%s\n' mg_name=singlenode '[end_of_params]' >$worldpath/map_meta.txt
+printf '%s\n' worldedit_run_tests=true max_forceloaded_blocks=9999 >$confpath
+
+if [ -n "$use_docker" ]; then
+       chmod -R 777 $tempdir
+       docker run --rm -i \
+               -v $confpath:/etc/minetest/minetest.conf \
+               -v $tempdir:/var/lib/minetest/.minetest \
+               -v "$PWD/worldedit":/var/lib/minetest/.minetest/world/worldmods/worldedit \
+               registry.gitlab.com/minetest/minetest/server:${MINETEST_VER}
+else
+       mkdir $worldpath/worldmods
+       ln -s "$PWD/worldedit" $worldpath/worldmods/worldedit
+       ../../bin/minetestserver --config $confpath --world $worldpath --logfile /dev/null
+fi
+
+test -f $worldpath/tests_ok || exit 1
+exit 0
diff --git a/util/run_tests.sh b/util/run_tests.sh
deleted file mode 100755 (executable)
index 5cbc15e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-tempdir=/tmp/mt
-confpath=$tempdir/minetest.conf
-worldpath=$tempdir/world
-
-use_docker=y
-[ -x ../../bin/minetestserver ] && use_docker=
-
-rm -rf $tempdir
-mkdir -p $worldpath
-# the docker image doesn't have devtest
-[ -n "$use_docker" ] || printf '%s\n' gameid=devtest >$worldpath/world.mt
-printf '%s\n' mg_name=singlenode '[end_of_params]' >$worldpath/map_meta.txt
-printf '%s\n' worldedit_run_tests=true max_forceloaded_blocks=9999 >$confpath
-
-if [ -n "$use_docker" ]; then
-       chmod -R 777 $tempdir
-       docker run --rm -i \
-               -v $confpath:/etc/minetest/minetest.conf \
-               -v $tempdir:/var/lib/minetest/.minetest \
-               -v "$PWD/worldedit":/var/lib/minetest/.minetest/world/worldmods/worldedit \
-               registry.gitlab.com/minetest/minetest/server:${MINETEST_VER}
-else
-       mkdir $worldpath/worldmods
-       ln -s "$PWD/worldedit" $worldpath/worldmods/worldedit
-       ../../bin/minetestserver --config $confpath --world $worldpath --logfile /dev/null
-fi
-
-test -f $worldpath/tests_ok || exit 1
-exit 0