Skip to content

Commit

Permalink
Merge pull request #14 from cytopia/travis
Browse files Browse the repository at this point in the history
TravisCI tests for OSX
  • Loading branch information
cytopia authored Dec 22, 2018
2 parents d313abc + 48d267d commit 1d5ed8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
27 changes: 13 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,21 @@ test:
@echo "# 1. Check for stderr errors/warnings #"
@echo "# -------------------------------------------------------------------- #"
@echo
$(MAKE) _populate
if ! ./timemachine -v $(SRC) $(DST) 3>&1- 1>&2- 2>&3- | grep ""; then \
@$(MAKE) _populate
@if ! ./timemachine -v $(SRC) $(DST) 3>&1- 1>&2- 2>&3- | grep -E '.+'; then \
printf "[TEST] [OK] No warnings detected for run without rsync arguments.\r\n"; \
else \
printf "[TEST] [FAIL] Warnings detected in stderr for run without rsync arguments.\r\n"; \
printf "%s\r\n" "$${STDERR}"; \
exit 1; \
fi
sleep 2
if ! ./timemachine -v $(SRC) $(DST) 3>&1- 1>&2- 2>&3- | grep ""; then \
@sleep 2
@if ! ./timemachine -v $(SRC) $(DST) 3>&1- 1>&2- 2>&3- | grep -E '.+'; then \
printf "[TEST] [OK] No warnings detected for run without rsync arguments.\r\n"; \
else \
printf "[TEST] [FAIL] Warnings detected in stderr for run without rsync arguments.\r\n"; \
printf "%s\r\n" "$${STDERR}"; \
exit 1; \
fi
@echo


@echo "# -------------------------------------------------------------------- #"
Expand Down Expand Up @@ -165,18 +164,18 @@ test:


clean:
rm -rf $(TEMP)
@rm -rf $(TEMP)



# -------------------------------------------------------------------------------------------------
# Helper targets
# -------------------------------------------------------------------------------------------------
_populate: clean
mkdir -p "$(DST)"
mkdir -p "$(SRC)"
echo "a" > "$(SRC)/a"
echo "b" > "$(SRC)/b"
echo "c" > "$(SRC)/c"
chmod -w "$(SRC)/a"
chmod +x "$(SRC)/b"
@mkdir -p "$(DST)"
@mkdir -p "$(SRC)"
@echo "a" > "$(SRC)/a"
@echo "b" > "$(SRC)/b"
@echo "c" > "$(SRC)/c"
@chmod -w "$(SRC)/a"
@chmod +x "$(SRC)/b"
4 changes: 2 additions & 2 deletions timemachine
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ MY_DESC="OSX-like timemachine cli script for Linux and BSD (and even OSX)"
MY_PROJ="https://github.com/cytopia/linux-timemachine"
MY_AUTH="cytopia"
MY_MAIL="[email protected]"
MY_VERS="0.2"
MY_DATE="2018-01-06"
MY_VERS="0.3"
MY_DATE="2018-12-22"

# cmd [-r] <src> <dst> [rsync opts]
verbose= # -v Verbose output
Expand Down

0 comments on commit 1d5ed8a

Please sign in to comment.