-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp(clap-test): simplified
make test
invocation
* assure `make test` works on OSX as well * simplified entire makefile, by basically removing sed invocations to manipulate the Cargo.toml file under source control. * *works for me* predicate This should probably be tested on another system as well, just to be sure it makes sense for everyone.
- Loading branch information
Showing
4 changed files
with
20 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,4 @@ version = "0.0.1" | |
authors = ["Kevin K. <[email protected]>"] | ||
|
||
[dependencies.clap] | ||
git = "https://github.com/kbknapp/clap-rs" | ||
branch = "master" | ||
path = ".." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,14 @@ | ||
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) | ||
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) | ||
URL:= | ||
BRANCH:= | ||
.PHONY: build test clean | ||
|
||
build: | ||
cargo update | ||
# It may be that this project was never built, and no Cargo.lock exists. | ||
# Thus it may be ignored | ||
cargo update 2>/dev/null || : | ||
cargo build --release | ||
|
||
test: | ||
cd "$(THIS_DIR)" | ||
cp Cargo.toml cargo.bak | ||
@read -p "Fork URL: " URL; \ | ||
sed "/^git/c\git = \"$$URL\"" cargo.bak > Cargo.toml | ||
@read -p "Branch [master]: " BRANCH; \ | ||
$(if $(strip $(BRANCH)), \ | ||
sed -i "/^branch/c\branch = \"master\"" Cargo.toml, \ | ||
sed -i "/^branch/c\branch = \"$$BRANCH\"" Cargo.toml) | ||
(make clean) || (make clean && false) | ||
cd "$(THIS_DIR)" | ||
(make build) || (make clean && false) | ||
cd "$(THIS_DIR)" | ||
(./run_tests.py) || (make clean && false) | ||
mv cargo.bak Cargo.toml | ||
make clean | ||
|
||
$(MAKE) build || ($(MAKE) clean && false) | ||
./run_tests.py | ||
|
||
clean: | ||
cd "$(THIS_DIR)" | ||
cargo clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env python | ||
#!/usr/bin/env python3 | ||
import sys | ||
import subprocess | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters