From 15bedf2eb49de35d2f369d2fcff0090595e58362 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sun, 26 Apr 2020 13:36:14 -0400 Subject: Move end-to-end-test out of Makefile into shell script --- Makefile | 3 +-- ci/script.sh | 3 ++- tests/test_color_only_output_matches_git_on_full_repo_history | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100755 tests/test_color_only_output_matches_git_on_full_repo_history 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') -- cgit v1.2.3