From 1ac1fee2bcd30027ba5698494c192a9078628023 Mon Sep 17 00:00:00 2001 From: Yuval Kogman Date: Mon, 11 Nov 2024 19:42:00 +0100 Subject: [PATCH 1/3] Use `#!/usr/bin/env bash` in test scripts This uses the path supplied `bash`, and will also allow the scripts to run on NixOS where `/usr/bin/env` is shimmed for compatibility but `/bin/bash` can't be relied on. --- contrib/test.sh | 2 +- payjoin-cli/contrib/test.sh | 2 +- payjoin-directory/contrib/test.sh | 2 +- payjoin/contrib/test.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/test.sh b/contrib/test.sh index 390aad23..0eff10fd 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e DEPS="recent minimal" diff --git a/payjoin-cli/contrib/test.sh b/payjoin-cli/contrib/test.sh index 825a1c03..aa8bdd22 100755 --- a/payjoin-cli/contrib/test.sh +++ b/payjoin-cli/contrib/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash cargo test --locked --package payjoin-cli --verbose --no-default-features --features=danger-local-https,v2 --test e2e cargo test --locked --package payjoin-cli --verbose --features=danger-local-https \ No newline at end of file diff --git a/payjoin-directory/contrib/test.sh b/payjoin-directory/contrib/test.sh index 81dbbef2..8127bc0b 100755 --- a/payjoin-directory/contrib/test.sh +++ b/payjoin-directory/contrib/test.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash cargo test --locked --package payjoin-directory --verbose --all-features --lib \ No newline at end of file diff --git a/payjoin/contrib/test.sh b/payjoin/contrib/test.sh index 683f04b2..632f487c 100755 --- a/payjoin/contrib/test.sh +++ b/payjoin/contrib/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cargo test --locked --package payjoin --verbose --all-features --lib From 307b00d3e15c1d01538654e708b7d7d9575f3018 Mon Sep 17 00:00:00 2001 From: Yuval Kogman Date: Mon, 11 Nov 2024 19:43:27 +0100 Subject: [PATCH 2/3] Use `set -e` consistently in test scripts --- payjoin-cli/contrib/test.sh | 1 + payjoin-directory/contrib/test.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/payjoin-cli/contrib/test.sh b/payjoin-cli/contrib/test.sh index aa8bdd22..01e2acb8 100755 --- a/payjoin-cli/contrib/test.sh +++ b/payjoin-cli/contrib/test.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e cargo test --locked --package payjoin-cli --verbose --no-default-features --features=danger-local-https,v2 --test e2e cargo test --locked --package payjoin-cli --verbose --features=danger-local-https \ No newline at end of file diff --git a/payjoin-directory/contrib/test.sh b/payjoin-directory/contrib/test.sh index 8127bc0b..fdfee3e6 100755 --- a/payjoin-directory/contrib/test.sh +++ b/payjoin-directory/contrib/test.sh @@ -1,3 +1,4 @@ #!/usr/bin/env bash +set -e cargo test --locked --package payjoin-directory --verbose --all-features --lib \ No newline at end of file From 4e7c81f3637cf060078efb4c0334a41443933e9a Mon Sep 17 00:00:00 2001 From: Yuval Kogman Date: Mon, 11 Nov 2024 19:44:07 +0100 Subject: [PATCH 3/3] nit: add trailing newlines --- payjoin-cli/contrib/test.sh | 2 +- payjoin-directory/contrib/test.sh | 2 +- payjoin/contrib/test.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/payjoin-cli/contrib/test.sh b/payjoin-cli/contrib/test.sh index 01e2acb8..f6ea7cd5 100755 --- a/payjoin-cli/contrib/test.sh +++ b/payjoin-cli/contrib/test.sh @@ -2,4 +2,4 @@ set -e cargo test --locked --package payjoin-cli --verbose --no-default-features --features=danger-local-https,v2 --test e2e -cargo test --locked --package payjoin-cli --verbose --features=danger-local-https \ No newline at end of file +cargo test --locked --package payjoin-cli --verbose --features=danger-local-https diff --git a/payjoin-directory/contrib/test.sh b/payjoin-directory/contrib/test.sh index fdfee3e6..d1dec41b 100755 --- a/payjoin-directory/contrib/test.sh +++ b/payjoin-directory/contrib/test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -cargo test --locked --package payjoin-directory --verbose --all-features --lib \ No newline at end of file +cargo test --locked --package payjoin-directory --verbose --all-features --lib diff --git a/payjoin/contrib/test.sh b/payjoin/contrib/test.sh index 632f487c..5f49c814 100755 --- a/payjoin/contrib/test.sh +++ b/payjoin/contrib/test.sh @@ -3,4 +3,4 @@ set -e cargo test --locked --package payjoin --verbose --all-features --lib cargo test --locked --package payjoin --verbose --features=send,receive --test integration -cargo test --locked --package payjoin --verbose --no-default-features --features=send,receive,danger-local-https,v2 --test integration \ No newline at end of file +cargo test --locked --package payjoin --verbose --no-default-features --features=send,receive,danger-local-https,v2 --test integration