diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Reorganize into source, assets and libraries
The C sources move to source/, the served files to assets/, the bundled Git submodule to libraries/git and the filter scripts to extensions/. Everything the build generates now lands in build/, so a clean is a single remove and the tree stays clean.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile2
-rwxr-xr-xtests/setup.sh4
-rwxr-xr-xtests/t0001-validate-git-versions.sh10
-rwxr-xr-xtests/t0108-patch.sh4
-rwxr-xr-xtests/valgrind/bin/cgit2
5 files changed, 11 insertions, 11 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 65e1117..38df21d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,4 +1,4 @@
-include ../git/config.mak.uname
+include ../libraries/git/config.mak.uname
-include ../cgit.conf
SHELL_PATH ?= $(SHELL)
diff --git a/tests/setup.sh b/tests/setup.sh
index 8db810f..db5361c 100755
--- a/tests/setup.sh
+++ b/tests/setup.sh
@@ -42,7 +42,7 @@ IFS=$LF
set -- $test_argv
IFS=$OLDIFS
-: ${TEST_DIRECTORY=$(pwd)/../git/t}
+: ${TEST_DIRECTORY=$(pwd)/../libraries/git/t}
: ${TEST_OUTPUT_DIRECTORY=$(pwd)}
TEST_NO_CREATE_REPO=YesPlease
. "$TEST_DIRECTORY"/test-lib.sh
@@ -55,7 +55,7 @@ then
PATH="$CGIT_VALGRIND/bin:$PATH"
export GIT_VALGRIND CGIT_VALGRIND
else
- PATH="$(pwd)/../..:$PATH"
+ PATH="$(pwd)/../../build:$PATH"
fi
FILTER_DIRECTORY=$(cd ../filters && pwd)
diff --git a/tests/t0001-validate-git-versions.sh b/tests/t0001-validate-git-versions.sh
index dd84fe3..79699fd 100755
--- a/tests/t0001-validate-git-versions.sh
+++ b/tests/t0001-validate-git-versions.sh
@@ -20,22 +20,22 @@ test_expect_success 'extract Git version from Makefile' '
# must apply the same transformation to the version in the Makefile before
# comparing them.
test_expect_success 'test Git version matches Makefile' '
- ( cat ../../git/GIT-VERSION-FILE || echo "No GIT-VERSION-FILE" ) |
+ ( cat ../../libraries/git/GIT-VERSION-FILE || echo "No GIT-VERSION-FILE" ) |
sed -e "s/GIT_VERSION[ ]*=[ ]*//" -e "s/\\.dirty$//" >git_version &&
sed -e "s/-/./g" makefile_version >makefile_git_version &&
test_cmp git_version makefile_git_version
'
test_expect_success 'test submodule version matches Makefile' '
- if ! test -e ../../git/.git
+ if ! test -e ../../libraries/git/.git
then
- echo "git/ is not a Git repository" >&2
+ echo "libraries/git/ is not a Git repository" >&2
else
(
cd ../.. &&
- sm_oid=$(git ls-files --stage -- git |
+ sm_oid=$(git ls-files --stage -- libraries/git |
sed -e "s/^[0-9]* \\([0-9a-f]*\\) [0-9] .*$/\\1/") &&
- cd git &&
+ cd libraries/git &&
git describe --match "v[0-9]*" $sm_oid
) | sed -e "s/^v//" -e "s/-/./" >sm_version &&
test_cmp sm_version makefile_version
diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh
index 013d680..18973bb 100755
--- a/tests/t0108-patch.sh
+++ b/tests/t0108-patch.sh
@@ -24,7 +24,7 @@ test_expect_success 'find `cgit` signature' '
'
test_expect_success 'compare with output of git-format-patch(1)' '
- CGIT_VERSION=$(sed -n "s/CGIT_VERSION = //p" ../../VERSION) &&
+ CGIT_VERSION=$(sed -n "s/CGIT_VERSION = //p" ../../build/VERSION) &&
git --git-dir="$PWD/repos/foo/.git" format-patch --subject-prefix="" --signature="cgit $CGIT_VERSION" --stdout HEAD^ >tmp2 &&
strip_headers <tmp >tmp_ &&
test_cmp tmp_ tmp2
@@ -53,7 +53,7 @@ test_expect_success 'find `cgit` signature' '
'
test_expect_success 'compare with output of git-format-patch(1)' '
- CGIT_VERSION=$(sed -n "s/CGIT_VERSION = //p" ../../VERSION) &&
+ CGIT_VERSION=$(sed -n "s/CGIT_VERSION = //p" ../../build/VERSION) &&
git --git-dir="$PWD/repos/foo/.git" format-patch -N --subject-prefix="" --signature="cgit $CGIT_VERSION" --stdout HEAD~3..HEAD >tmp2 &&
strip_headers <tmp >tmp_ &&
test_cmp tmp_ tmp2
diff --git a/tests/valgrind/bin/cgit b/tests/valgrind/bin/cgit
index dcdfbe5..56ca807 100755
--- a/tests/valgrind/bin/cgit
+++ b/tests/valgrind/bin/cgit
@@ -9,4 +9,4 @@ exec valgrind -q --error-exitcode=126 \
--track-origins=yes \
--log-fd=4 \
--input-fd=4 \
- "$CGIT_VALGRIND/../../cgit" "$@"
+ "$CGIT_VALGRIND/../../build/cgit" "$@"