summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-04-26 13:36:14 -0400
committerDan Davison <dandavison7@gmail.com>2020-04-26 14:45:50 -0400
commit15bedf2eb49de35d2f369d2fcff0090595e58362 (patch)
tree07e524f9360c7d2a801fb87d097a6aece4958327
parentda89d65703c36e26840a2a40bb778fcb78120f60 (diff)
Move end-to-end-test out of Makefile into shell script
-rw-r--r--Makefile3
-rwxr-xr-xci/script.sh3
-rwxr-xr-xtests/test_color_only_output_matches_git_on_full_repo_history3
3 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b3c2762..f9eeb71 100644
--- a/Makefile
+++ b/Makefile
@@ -9,9 +9,8 @@ test: unit-test end-to-end-test
unit-test:
cargo test
-GIT_LOG_TEST_COMMAND = git log --patch --stat --numstat
end-to-end-test: build
- bash -c "diff -u <($(GIT_LOG_TEST_COMMAND)) <($(GIT_LOG_TEST_COMMAND) | target/release/delta --color-only | perl -pe 's/\e\[[0-9;]*m//g')"
+ ./tests/test_color_only_output_matches_git_on_full_repo_history
release:
@make -f release.Makefile release
diff --git a/ci/script.sh b/ci/script.sh
index 954cb52..51e638d 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -8,7 +8,8 @@ cargo build --target "$TARGET" --verbose
# We cannot run arm executables on linux
if [[ $TARGET != arm-unknown-linux-gnueabihf ]] && [[ $TARGET != aarch64-unknown-linux-gnu ]]; then
cargo test --target "$TARGET" --verbose
- make end-to-end-test
+ cargo build --release
+ ./tests/test_color_only_output_matches_git_on_full_repo_history
cargo run --target "$TARGET" -- < /dev/null
fi
diff --git a/tests/test_color_only_output_matches_git_on_full_repo_history b/tests/test_color_only_output_matches_git_on_full_repo_history
new file mode 100755
index 0000000..ebe656e
--- /dev/null
+++ b/tests/test_color_only_output_matches_git_on_full_repo_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+GIT_ARGS="log --patch --stat --numstat"
+diff -u <(git $GIT_ARGS) <(git $GIT_ARGS | ./target/release/delta --color-only | perl -pe 's/\e\[[0-9;]*m//g')