test: Updates.
This commit is contained in:
parent
61ee206b8d
commit
503be95f97
|
@ -9,6 +9,7 @@ if [ -z "$PREFIX" ]; then
|
||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BASH=$(command -v bash)
|
||||||
GUILE=$(command -v guile)
|
GUILE=$(command -v guile)
|
||||||
GUILE_TOOLS=$(command -v guile-tools)
|
GUILE_TOOLS=$(command -v guile-tools)
|
||||||
GUILE_SITE_DIR=$PREFIX/share/guile/site/$GUILE_EFFECTIVE_VERSION
|
GUILE_SITE_DIR=$PREFIX/share/guile/site/$GUILE_EFFECTIVE_VERSION
|
||||||
|
@ -22,6 +23,7 @@ sed \
|
||||||
bin/gash.in > bin/gash
|
bin/gash.in > bin/gash
|
||||||
chmod +x bin/gash
|
chmod +x bin/gash
|
||||||
cat > .config.make <<EOF
|
cat > .config.make <<EOF
|
||||||
|
BASH=$BASH
|
||||||
GUILE=$GUILE
|
GUILE=$GUILE
|
||||||
GUILE_TOOLS=$GUILE_TOOLS
|
GUILE_TOOLS=$GUILE_TOOLS
|
||||||
PREFIX=$PREFIX
|
PREFIX=$PREFIX
|
||||||
|
|
16
makefile
16
makefile
|
@ -1,4 +1,4 @@
|
||||||
.PHONY: all all-go clean install
|
.PHONY: all all-go check clean install
|
||||||
-include .config.make
|
-include .config.make
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
@ -20,8 +20,15 @@ clean:
|
||||||
clean-go:
|
clean-go:
|
||||||
rm -f $(shell find . -name '*.go')
|
rm -f $(shell find . -name '*.go')
|
||||||
|
|
||||||
check: all
|
check: all check-bash check-gash
|
||||||
echo TODO
|
|
||||||
|
check-bash: all
|
||||||
|
ifneq ($(BASH),)
|
||||||
|
SHELL=$(BASH) ./test.sh
|
||||||
|
endif
|
||||||
|
|
||||||
|
check-gash: all
|
||||||
|
./test.sh
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
mkdir -p $(DESTDIR)$(BINDIR)
|
mkdir -p $(DESTDIR)$(BINDIR)
|
||||||
|
@ -40,6 +47,7 @@ Usage: make [OPTION]... [TARGET]...
|
||||||
Targets:
|
Targets:
|
||||||
all update everything
|
all update everything
|
||||||
all-go update .go files
|
all-go update .go files
|
||||||
|
check run ./test.sh
|
||||||
clean run git clean -dfx
|
clean run git clean -dfx
|
||||||
clean-go clean .go files
|
clean-go clean .go files
|
||||||
install install in $(PREFIX)
|
install install in $(PREFIX)
|
||||||
|
@ -48,8 +56,10 @@ export HELP_TOP
|
||||||
help:
|
help:
|
||||||
@echo "$$HELP_TOP"
|
@echo "$$HELP_TOP"
|
||||||
|
|
||||||
|
export BUILD_DEBUG
|
||||||
export GUILE
|
export GUILE
|
||||||
export GUILE_TOOLS
|
export GUILE_TOOLS
|
||||||
export GUILE_LOAD_PATH
|
export GUILE_LOAD_PATH
|
||||||
export GUILE_LOAD_COMPILED_PATH
|
export GUILE_LOAD_COMPILED_PATH
|
||||||
|
|
||||||
|
|
||||||
|
|
18
test.sh
18
test.sh
|
@ -1 +1,17 @@
|
||||||
for f in test/*; do echo $f ":"; bin/gash $f; echo; done
|
if [ -n "$BUILD_DEBUG" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
SHELL=${SHELL-bin/gash}
|
||||||
|
for f in test/*.sh; do
|
||||||
|
echo -n "$f: "
|
||||||
|
b=test/$(basename $f .sh)
|
||||||
|
$SHELL $f
|
||||||
|
r=$?
|
||||||
|
if [ -f $b.exit ]; then
|
||||||
|
e=$(cat $b.exit)
|
||||||
|
else
|
||||||
|
e=0
|
||||||
|
fi
|
||||||
|
[ $r = $e ] || exit 1
|
||||||
|
echo pass
|
||||||
|
done
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
exit
|
|
@ -0,0 +1 @@
|
||||||
|
exit 0
|
|
@ -0,0 +1 @@
|
||||||
|
1
|
|
@ -0,0 +1 @@
|
||||||
|
exit 1
|
|
@ -0,0 +1 @@
|
||||||
|
echo
|
|
@ -0,0 +1 @@
|
||||||
|
echo $SHELL
|
|
@ -0,0 +1,2 @@
|
||||||
|
SHELL=/bin/bash
|
||||||
|
echo $SHELL
|
|
@ -0,0 +1 @@
|
||||||
|
for f in test/*.sh; do echo "$f:" | grep '.sh' ; done
|
Loading…
Reference in New Issue