aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests/Makefile
blob: 65e111733803b2049e011ac44ff8dae15eeeba17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
include ../git/config.mak.uname
-include ../cgit.conf

SHELL_PATH ?= $(SHELL)
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))

T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)

all: $(T)

$(T):
	@'$(SHELL_PATH_SQ)' $@ $(CGIT_TEST_OPTS)

clean:
	$(RM) -rf trash

.PHONY: $(T) clean
>, sha1)){ cgit_print_error(fmt("Bad hex value: %s", hex)); return; } type = sha1_object_info(sha1, &size); if (type == OBJ_BAD) { cgit_print_error(fmt("Bad object name: %s", hex)); return; } buf = read_sha1_file(sha1, &type, &size); if (!buf) { cgit_print_error(fmt("Error reading object %s", hex)); return; } buf[size] = '\0'; cgit_print_snapshot_start("text/plain", path, item); write(htmlfd, buf, size); }